NFSPROC_READ - Read From File
- struct readargs { fhandle file; unsigned offset; unsigned count; unsigned totalcount; };
fhandle is defined in
Basic Data Types .
- union readres switch (stat status) { case NFS_OK: fattr attributes; opaque data<NFS_MAXDATA>; default: void; };
fattr and sattr are defined in
Basic Data Types .
- readres NFSPROC_READ(readargs) = 6;
Up to count bytes of data are returned from the file given by file starting at offset bytes from the beginning of the file. The first byte of the file is at offset zero. The file attributes, after the read takes place, are returned in attributes. Read operations should only be permitted on regular files. Reading directory files should be performed using the NFSPROC_READDIR procedure (see
Name ).Note that the argument totalcount is unused.
- NFS_OK
- Indicates that the call completed successfully and the results are valid.
- NFSERR_IO
- Some sort of hard error occurred when the operation was in progress. This could be a disk error, for example.
- NFSERR_ACCES
- Permission denied. The caller does not have the correct permission to perform the requested operation.
- NFSERR_ISDIR
- Is a directory. The caller specified a directory in a non-directory operation.
- NFSERR_STALE
- The fhandle given in the arguments was invalid. That is, the file referred to by that file handle no longer exists, or access to it has been revoked.
Contents | Next section | Index |