#include <sys/types.h> #include <sys/stat.h> int mount(const char *mountPoint, char *fileSystem, char *fileSysType, mtm_t mountMode, int parmLength, char *parm);
mount
specifies a mount point for a file system, making it
available within the hierarchical file system. Mounts must be
requested by a superuser, and only one mount point may be specified
for each file system.
mountPoint
fileSystem
fileSystem
is a 1- to 44-character MVS data set name that is specified
as all uppercase letters.
fileSysType
fileSysType
is "HFS"
. Refer to
MVS/ESA Initialization and Tuning Reference
(SC28-1452)
for more information
on BPXPRMxx.
mountMode
MTM_RDONLY
MTM_RDWR
parmLength
parm
argument, up to a
maximum of 1024 characters.
parm
fileSysType
. The content and format of
parm
is
determined by the file system.
The parmLength
and parm
parameters are ignored when
mounting
a hierarchical file system (HFS) data set.
mount
returns 0
if the mount is successful and a -1
if
it fails.
mount
function may be useful in OpenEdition
applications; however,
it is not defined by the POSIX.1 standard and should not be used
in portable applications.
mount
to establish a mount point in the hierarchical file system.
#include <sys/types.h> #include <sys/stat.h> #include <stdio.h> main() { char *mountPoint = "/usr"; char *HFS = "POSIX.FILE.SYSTEM"; char *mountType[9] = "HFS "; . . . if (mount(mountPoint, HFS, mountType, MTM_RDWR, 0, NULL) != 0) perror("error mounting file system"); . . . }
umount
, w_getmntent
, w_statfs
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.