NFSMOUNT(2) — SYSTEM CALLS
NAME
nfsmount − mount an NFS file system
SYNOPSIS
#include <netinet/in.h>
#include <nfs/nfs.h>
nfsmount(addr, fh, dir, flags, rsize, wsize)
struct sockaddr_in ∗addr;
fhandle_t ∗fh;
char ∗freq;
int flags;
int rsize;
int wsize;
DESCRIPTION
Nfsmount mounts an NFS(4) file system on the directory dir. Addr is the UDP(4) address of the server that owns the file system to mount. Fh is a file handle, obtained from the server, to identify the root directory on the server that is being mounted.
The flags argument contains mount flag bits. The NFSMNT_RDONLY flag tells whether the file system can be written on; if it is 0 writing is allowed, if non-zero no writing is done.
The NFSMNT_SOFT flag determines whether the remote file system is mounted hard or soft. A soft mount causes an error to be returned when a remote access times out. Hard mounts cause the access to retry until the server responds. A value of 1 indicates a soft mount.
The NFSMNT_RSIZE and NFSMNT_WSIZE flags tell whether the rsize and wsize parameters are valid. If a flag is set the coresponding parameter is used to set the number of bytes sent in a read or write operation.
RETURN VALUE
Nfsmount returns 0 if the action occurred, −1 if some error occurred.
ERRORS
Nfsmount will fail when one of the following occurs:
[EPERM] The caller is not the super-user or the path name given for dir contains characters with the high bit set.
[ENAMETOOLONG]
The path name for dir is too long.
[ELOOP] Dir contains a symbolic link loop.
[ETIMEDOUT] The server at addr is not accessable. This can only happen if the hard flag is set.
[ENOTDIR] A component of the path prefix in dir is not a directory.
[EBUSY] Another process currently holds a reference to fh.
SEE ALSO
mount(2), unmount(2), mount(8)
Sun Release 2.2 — Last change: 1 February 1985