Chapter Contents |
Previous |
Next |
mount |
Portability: | SAS/C extension |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
PORTABILITY | |
EXAMPLE | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <sys/types.h> #include <sys/stat.h> int mount(const char *mountPoint, char *fileSystem, char *fileSysType, mtm_t mountMode, int parmLength, char *parm);
DESCRIPTION |
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 OS/390 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
|
Read-only file system |
MTM_RDWR
|
Read/Write file system |
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.
RETURN VALUE |
mount
returns
0
if the mount is successful and a
-1
if it fails.
PORTABILITY |
The
mount
function may be useful in USS applications; however, it is not
defined by the POSIX.1 standard and should not be used in portable applications.
EXAMPLE |
The following code fragment illustrates
the use of
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"); . . . }
RELATED FUNCTIONS |
umount
,
w_getmntent
,
w_statfs
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.