[ARVADOS] created: 2.1.0-1834-g78dff0eb7
Git user
git at public.arvados.org
Thu Jan 20 17:05:24 UTC 2022
at 78dff0eb731f126c59d92e56c90110e561b24340 (commit)
commit 78dff0eb731f126c59d92e56c90110e561b24340
Author: Tom Clegg <tom at curii.com>
Date: Thu Jan 20 12:04:51 2022 -0500
18659: Cast OS-specific device number type to uint64.
Fixes compile error on GOOS=darwin.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keepstore/unix_volume.go b/services/keepstore/unix_volume.go
index a053ba3e6..dd62cf131 100644
--- a/services/keepstore/unix_volume.go
+++ b/services/keepstore/unix_volume.go
@@ -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 {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list