
#include <sys/types.h> #include <sys/stat.h> int umount(const char *fileSystem, mtm_t mountMode);
umount unmounts a file system from the hierarchical file
system. The fileSystem argument is a pointer to a
null-terminated string containing the name of the file system to
be removed.
The name specified by fileSystem must match the
name specified as an argument to the mount
function when the file system was mounted. Like the mount
function, umount can be issued only by a superuser.
mountMode can be any one of the following symbolic names:
MTM_UMOUNT
MTM_DRAIN
MTM_DRAIN waits until all use of the
specified file system is terminated and then unmounts the file
system.
MTM_IMMED
MTM_FORCE
MTM_RESET
umount function is useful in OpenEdition applications;
however,
it is not defined by the POSIX.1 standard and should not be used
in portable applications.
umount returns a 0 if successful and a -1 if unsuccessful.
umount to
unmount a file system:
#include <sys/types.h>
#include <sys/stat.h>
main()
{
char *HFS = "POSIX.FILE.SYSTEM";
.
.
.
umount(HFS, MTM_DRAIN);
.
.
.
}
mount, w_getmntent
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.