lose -s flag for umount.

This commit is contained in:
Ben Gras 2009-04-27 14:23:57 +00:00
parent a12113e476
commit 02f047d008
2 changed files with 3 additions and 17 deletions

View file

@ -26,16 +26,8 @@ int main(argc, argv)
int argc;
char *argv[];
{
int sflag = 0;
while (argc > 1 && argv[1][0] == '-') {
char *opt = argv[1]+1;
while (*opt) if (*opt++ == 's') sflag = 1; else usage();
argc--;
argv++;
}
if (argc != 2) usage();
if ((sflag ? svrctl(MMSWAPOFF, NULL) : umount(argv[1])) < 0) {
if (umount(argv[1]) < 0) {
if (errno == EINVAL)
std_err("Device not mounted\n");
else
@ -82,7 +74,7 @@ char *devname;
void usage()
{
std_err("Usage: umount [-s] special\n");
std_err("Usage: umount special\n");
exit(1);
}

View file

@ -2,7 +2,7 @@
.SH NAME
umount \- unmount a mounted file system
.SH SYNOPSIS
\fBumount \fR[\fB\-s\fR] \fIspecial\fR
\fBumount \fIspecial\fR
.br
.de FL
.TP
@ -14,8 +14,6 @@ umount \- unmount a mounted file system
\\fB\\$1\\fR
# \\$2
..
.SH OPTIONS
.FL "\-s" "Unmount swapspace instead of a file system"
.SH EXAMPLES
.EX "umount /dev/fd1" "Unmount diskette 1"
.SH DESCRIPTION
@ -26,10 +24,6 @@ If this happens, and is discovered before another diskette is inserted, the
original one can be replaced without harm.
Attempts to unmount a file system holding working directories or open files
will be rejected with a \&'device busy\&' message.
.PP
With the
.B \-s
flag one can unmount swap space.
.SH "SEE ALSO"
.BR mount (1),
.BR umount (2).