summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1996-09-30 20:04:24 +0000
committerguido <guido@FreeBSD.org>1996-09-30 20:04:24 +0000
commit7706e782e683d8d989a649d386f2b5c12ccd2768 (patch)
treed6d104228a90764ad298813d96144b726ae4baa5 /sbin
parent8c9f462db0e64312a9d88a3f3a34d1168e8537d1 (diff)
downloadFreeBSD-src-7706e782e683d8d989a649d386f2b5c12ccd2768.zip
FreeBSD-src-7706e782e683d8d989a649d386f2b5c12ccd2768.tar.gz
Get rid of useless -f flag (though left for historical reasons).
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsdb/fsdb.87
-rw-r--r--sbin/fsdb/fsdb.c11
2 files changed, 15 insertions, 3 deletions
diff --git a/sbin/fsdb/fsdb.8 b/sbin/fsdb/fsdb.8
index 92469f3..a55a56f 100644
--- a/sbin/fsdb/fsdb.8
+++ b/sbin/fsdb/fsdb.8
@@ -35,7 +35,8 @@
.Sh SYNOPSIS
.Nm
.Op Fl d
-.Fl f Ar fsname
+.Op Fl f
+.Ar fsname
.Sh DESCRIPTION
.Nm
opens
@@ -59,6 +60,10 @@ The
option enables additional debugging output (which comes primarily from
.Xr fsck 8 -derived
code).
+.Pp
+The
+.Fl f
+option is left for historical reasons and has no meaning.
.Sh COMMANDS
Besides the built-in
.Xr libedit 3
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index aba9f1b..3993581 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -95,8 +95,15 @@ main(argc, argv)
usage();
}
}
- if (fsys == NULL)
- usage();
+ argc -= optind;
+ argv += optind;
+ if (fsys == NULL) {
+ if (argc != 1)
+ usage();
+ else
+ fsys = argv[0];
+ }
+
if (!setup(fsys))
errx(1, "cannot set up file system `%s'", fsys);
printf("Editing file system `%s'\nLast Mounted on %s\n", fsys,
OpenPOWER on IntegriCloud