Skip to content

Commit

Permalink
doc: update Rstatfs description
Browse files Browse the repository at this point in the history
Problem: the description of Rstatfs suggests that an implementation
should call statfs(2), but it can now be satisfied with statvfs(3) in
a more portable manner.

Just refer to statvfs(3).  Don't quote structs as that's available
elsewhere.
  • Loading branch information
garlick committed Jan 13, 2025
1 parent 27e81df commit d2b311f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,7 @@ size[4] Tstatfs tag[2] fid[4]
size[4] Rstatfs tag[2] type[4] bsize[4] blocks[8] bfree[8] bavail[8]
files[8] ffree[8] fsid[8] namelen[4]
```
statfs is used to request file system information of the file system containing fid. The Rstatfs response corresponds to the fields returned by the statfs(2) system call, e.g.:
```
struct statfs {
long f_type; /* type of file system (see below) */
long f_bsize; /* optimal transfer block size */
long f_blocks; /* total data blocks in file system */
long f_bfree; /* free blocks in fs */
long f_bavail; /* free blocks avail to non-superuser */
long f_files; /* total file nodes in file system */
long f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
long f_namelen; /* maximum length of filenames */
};
```
statfs is used to request file system information of the file system containing fid. See statvfs(3).

#### lopen -- open a file
```
Expand Down

0 comments on commit d2b311f

Please sign in to comment.