lose -s flag for umount.
This commit is contained in:
parent
a12113e476
commit
02f047d008
|
@ -26,16 +26,8 @@ int main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
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 (argc != 2) usage();
|
||||||
if ((sflag ? svrctl(MMSWAPOFF, NULL) : umount(argv[1])) < 0) {
|
if (umount(argv[1]) < 0) {
|
||||||
if (errno == EINVAL)
|
if (errno == EINVAL)
|
||||||
std_err("Device not mounted\n");
|
std_err("Device not mounted\n");
|
||||||
else
|
else
|
||||||
|
@ -82,7 +74,7 @@ char *devname;
|
||||||
|
|
||||||
void usage()
|
void usage()
|
||||||
{
|
{
|
||||||
std_err("Usage: umount [-s] special\n");
|
std_err("Usage: umount special\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.SH NAME
|
.SH NAME
|
||||||
umount \- unmount a mounted file system
|
umount \- unmount a mounted file system
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBumount \fR[\fB\-s\fR] \fIspecial\fR
|
\fBumount \fIspecial\fR
|
||||||
.br
|
.br
|
||||||
.de FL
|
.de FL
|
||||||
.TP
|
.TP
|
||||||
|
@ -14,8 +14,6 @@ umount \- unmount a mounted file system
|
||||||
\\fB\\$1\\fR
|
\\fB\\$1\\fR
|
||||||
# \\$2
|
# \\$2
|
||||||
..
|
..
|
||||||
.SH OPTIONS
|
|
||||||
.FL "\-s" "Unmount swapspace instead of a file system"
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.EX "umount /dev/fd1" "Unmount diskette 1"
|
.EX "umount /dev/fd1" "Unmount diskette 1"
|
||||||
.SH DESCRIPTION
|
.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.
|
original one can be replaced without harm.
|
||||||
Attempts to unmount a file system holding working directories or open files
|
Attempts to unmount a file system holding working directories or open files
|
||||||
will be rejected with a \&'device busy\&' message.
|
will be rejected with a \&'device busy\&' message.
|
||||||
.PP
|
|
||||||
With the
|
|
||||||
.B \-s
|
|
||||||
flag one can unmount swap space.
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR mount (1),
|
.BR mount (1),
|
||||||
.BR umount (2).
|
.BR umount (2).
|
||||||
|
|
Loading…
Reference in a new issue