![]() Chapter Contents  | 
![]() Previous  | 
![]() Next  | 
| umount | 
| Portability: | SAS/C extension | 
| SYNOPSIS | |
| DESCRIPTION | |
| PORTABILITY | |
| RETURN VALUE | |
| EXAMPLE | |
| RELATED FUNCTIONS | 
| SYNOPSIS | 
#include <sys/stat.h> int umount(const char *fileSystem, mtm_t mountMode);
| DESCRIPTION | 
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
| PORTABILITY | 
The 
umount
 function is useful in USS applications; however, it is not defined
by the POSIX.1 standard and should not be used in portable applications.
| RETURN VALUE | 
umount
 returns a 
0
if successful and a 
-1
if unsuccessful.
| EXAMPLE | 
The following code fragment illustrates
the use of 
umount
 to unmount
a file system: 
#include <sys/types.h>
#include <sys/stat.h>
main()
{
char *HFS = "POSIX.FILE.SYSTEM";
.
.
.
umount(HFS, MTM_DRAIN);
.
.
.
}
| RELATED FUNCTIONS | 
![]() Chapter Contents  | 
![]() Previous  | 
![]() Next  | 
![]() Top of Page  | 
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.