diff --git a/src/path/inode_path_bridge.rs b/src/path/inode_path_bridge.rs index b157467..4932a0d 100644 --- a/src/path/inode_path_bridge.rs +++ b/src/path/inode_path_bridge.rs @@ -727,7 +727,7 @@ where req: Request, parent: u64, fh: u64, - offset: i64, + offset: u64, ) -> Result> + Send + '_>> { let mut inode_name_manager = self.inode_name_manager.write().await; let parent_path = inode_name_manager diff --git a/src/path/path_filesystem.rs b/src/path/path_filesystem.rs index dea3623..cded891 100644 --- a/src/path/path_filesystem.rs +++ b/src/path/path_filesystem.rs @@ -308,7 +308,7 @@ pub trait PathFilesystem { req: Request, path: &'a OsStr, fh: u64, - offset: i64, + offset: u64, ) -> Result> + Send + 'a>> { Err::>, _>(libc::ENOSYS.into()) } diff --git a/src/path/reply.rs b/src/path/reply.rs index 724447a..10eff43 100644 --- a/src/path/reply.rs +++ b/src/path/reply.rs @@ -119,7 +119,7 @@ pub struct DirectoryEntry { /// entry name. pub name: OsString, /// Directory offset of the _next_ entry - pub offset: i64, + pub offset: u64, } /// readdir reply. @@ -143,7 +143,7 @@ pub struct DirectoryEntryPlus { /// the entry name. pub name: OsString, /// Directory offset of the _next_ entry - pub offset: i64, + pub offset: u64, /// the entry attribute. pub attr: FileAttr, /// the entry TTL. diff --git a/src/raw/filesystem.rs b/src/raw/filesystem.rs index 9d907b4..3fa430b 100644 --- a/src/raw/filesystem.rs +++ b/src/raw/filesystem.rs @@ -293,7 +293,7 @@ pub trait Filesystem { req: Request, parent: Inode, fh: u64, - offset: i64, + offset: u64, ) -> Result> + Send + 'a>> { Err::>, _>(libc::ENOSYS.into()) } diff --git a/src/raw/reply.rs b/src/raw/reply.rs index 77f435c..b06f184 100644 --- a/src/raw/reply.rs +++ b/src/raw/reply.rs @@ -246,7 +246,7 @@ pub struct DirectoryEntry { /// entry name. pub name: OsString, /// Directory offset of the _next_ entry - pub offset: i64, + pub offset: u64, } /// readdir reply. @@ -384,7 +384,7 @@ pub struct DirectoryEntryPlus { /// the entry name. pub name: OsString, /// Directory offset of the _next_ entry - pub offset: i64, + pub offset: u64, /// the entry attribute. pub attr: FileAttr, /// the entry TTL. diff --git a/src/raw/session.rs b/src/raw/session.rs index 128d817..aca5c63 100644 --- a/src/raw/session.rs +++ b/src/raw/session.rs @@ -3036,7 +3036,7 @@ impl Session { ); let reply_readdir = match fs - .readdir(request, in_header.nodeid, read_in.fh, read_in.offset as i64) + .readdir(request, in_header.nodeid, read_in.fh, read_in.offset) .await { Err(err) => { @@ -3078,7 +3078,7 @@ impl Session { let dir_entry = fuse_dirent { ino: entry.inode, - off: entry.offset as u64, + off: entry.offset, namelen: name.len() as u32, // learn from fuse-rs and golang bazil.org fuse DirentType r#type: mode_from_kind_and_perm(entry.kind, 0) >> 12,