aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Shiraishi <zchee.io@gmail.com>2016-09-06 14:56:35 +0900
committerKoichi Shiraishi <zchee.io@gmail.com>2016-11-29 02:45:13 +0900
commite99f57f8b49cf662e9149c962b7ffbcafc9a07fc (patch)
treede4b6c9ed4aa473840b1b9ed19a78a8645969e82
parent0a72af2066c99655d57bac95acea8732fcfcbd0f (diff)
[go] fix stat.Dev type to uint64
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
-rw-r--r--pathutil.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pathutil.go b/pathutil.go
index 0d3aa05..ad11c22 100644
--- a/pathutil.go
+++ b/pathutil.go
@@ -191,7 +191,7 @@ func (c *fsCacheT) readdir(dir string, id fileid) (fileid, []dirent) {
return invalidFileid, nil
}
if stat, ok := fi.Sys().(*syscall.Stat_t); ok {
- id = fileid{dev: stat.Dev, ino: stat.Ino}
+ id = fileid{dev: uint64(stat.Dev), ino: stat.Ino}
}
names, _ := d.Readdirnames(-1)
// need sort?
@@ -209,7 +209,7 @@ func (c *fsCacheT) readdir(dir string, id fileid) (fileid, []dirent) {
mode := lmode
var id fileid
if stat, ok := fi.Sys().(*syscall.Stat_t); ok {
- id = fileid{dev: stat.Dev, ino: stat.Ino}
+ id = fileid{dev: uint64(stat.Dev), ino: stat.Ino}
}
if lmode&os.ModeSymlink == os.ModeSymlink {
fi, err = os.Stat(path)
@@ -218,7 +218,7 @@ func (c *fsCacheT) readdir(dir string, id fileid) (fileid, []dirent) {
} else {
mode = fi.Mode()
if stat, ok := fi.Sys().(*syscall.Stat_t); ok {
- id = fileid{dev: stat.Dev, ino: stat.Ino}
+ id = fileid{dev: uint64(stat.Dev), ino: stat.Ino}
}
}
}