From a4ffa71f0b4c59174cdeb70ec16865644b3d4561 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Mon, 27 Jul 2015 13:29:29 +1000 Subject: [PATCH] Use uint32 for Nlink, matching fuse. Cf. https://github.com/torvalds/linux/blob/00c570f/include/uapi/linux/fuse.h#L159 --- fuseops/convert.go | 2 +- fuseops/simple_types.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fuseops/convert.go b/fuseops/convert.go index c9f3db5..930e444 100644 --- a/fuseops/convert.go +++ b/fuseops/convert.go @@ -472,7 +472,7 @@ func convertAttributes( out.Mtime, out.MtimeNsec = convertTime(in.Mtime) out.Ctime, out.CtimeNsec = convertTime(in.Ctime) out.SetCrtime(convertTime(in.Crtime)) - out.Nlink = uint32(in.Nlink) // TODO(jacobsa): Make the public field uint32? + out.Nlink = in.Nlink out.Uid = in.Uid out.Gid = in.Gid diff --git a/fuseops/simple_types.go b/fuseops/simple_types.go index c41d872..d63d3e0 100644 --- a/fuseops/simple_types.go +++ b/fuseops/simple_types.go @@ -61,7 +61,7 @@ type InodeAttributes struct { Size uint64 // The number of incoming hard links to this inode. - Nlink uint64 + Nlink uint32 // The mode of the inode. This is exposed to the user in e.g. the result of // fstat(2).