Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

NFSPROC_WRITE - Write to File

Call Arguments

struct writeargs { fhandle file; unsigned beginoffset; unsigned offset; unsigned totalcount; opaque data<NFS_MAXDATA>; };

fhandle is defined in Basic Data Types .

Return Arguments

union attrstat switch (stat status) { case NFS_OK: fattr attributes; default: void; };

fattr and sattr are defined in Basic Data Types .

RPC Procedure Description

attrstat NFSPROC_WRITE(writeargs) = 8;

Description

data is written, beginning offset bytes from the beginning of file. The first byte of the file is at offset zero. If the reply status is NFS_OK, then the reply attributes contains the attributes of the file after the write has completed. The write operation is atomic. Data from this call to NFSPROC_WRITE will not be mixed with data from another client's calls. Write operations should only be permitted on regular files.

Note that the arguments beginoffset and totalcount are unused.

Return Codes

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_FBIG
File too large. The operation caused a file to grow beyond the server's limit.

NFSERR_NOSPC
No space left on device. The operation caused the server's file system to reach its limit.

NFSERR_ROFS
Read-only file system. Write attempted on a read-only file system.

NFSERR_DQUOT
Disk quota exceeded. The client's disk quota on the server has been exceeded.

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.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index