Refactor the multi-host salt install page.
[arvados.git] / services / keepstore / unix_volume.go
index a053ba3e6b19042c48423cf31303e8cc2059fa1d..dd62cf1319318fb4f5dbe52869311bb55b6b8008 100644 (file)
@@ -321,7 +321,12 @@ func (v *UnixVolume) Status() *VolumeStatus {
                v.logger.WithError(err).Error("stat failed")
                return nil
        }
-       devnum := fi.Sys().(*syscall.Stat_t).Dev
+       // uint64() cast here supports GOOS=darwin where Dev is
+       // int32. If the device number is negative, the unsigned
+       // devnum won't be the real device number any more, but that's
+       // fine -- all we care about is getting the same number each
+       // time.
+       devnum := uint64(fi.Sys().(*syscall.Stat_t).Dev)
 
        var fs syscall.Statfs_t
        if err := syscall.Statfs(v.Root, &fs); err != nil {