#include <sys/types.h> #include <sys/mount.h>
int mount (spec, dir, mflag, fstyp, dataptr, datalen) char *spec, *dir; int mflag, fstyp; char *dataptr; int datalen;
If the MS_DATA flag is set in mflag, the system expects the dataptr and datalen arguments to be present. Together they describe a block of file-system specific data at address dataptr of length datalen. This is interpreted by file-system specific code within the operating system and its format depends upon the filesystem type. A particular filesystem type may not require this data, in which case dataptr and datalen should both be zero. Note that MS_FSS is obsolete and is ignored if MS_DATA is also set, but if MS_FSS is set and MS_DATA is not, dataptr and datalen are both assumed to be zero.
Upon successful completion, references to the file dir refer to the root directory on the mounted filesystem.
The MS_RDONLY bit of mflag is used to control write permission on the mounted filesystem; if it is set, writing is forbidden, otherwise writing is permitted according to individual file accessibility.
mount may be invoked only by the super user. It is intended for use only by the mount(ADM) utility.
mount fails if one or more of the following is true: