From: Ben Gras Date: Mon, 27 Apr 2009 14:23:57 +0000 (+0000) Subject: lose -s flag for umount. X-Git-Tag: v3.1.4~65 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=02f047d008432e50c9c77cc9ed95401822f8478b;p=minix.git lose -s flag for umount. --- diff --git a/commands/simple/umount.c b/commands/simple/umount.c index 928d0093f..8904ae1bf 100755 --- a/commands/simple/umount.c +++ b/commands/simple/umount.c @@ -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); } diff --git a/man/man1/umount.1 b/man/man1/umount.1 index 2900d092e..f082d610d 100644 --- a/man/man1/umount.1 +++ b/man/man1/umount.1 @@ -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).