From fe3a5bd4585addbb4caa43cc6799669f437979e5 Mon Sep 17 00:00:00 2001 From: Guido van Rooij Date: Mon, 30 Sep 1996 20:04:24 +0000 Subject: [PATCH] Get rid of useless -f flag (though left for historical reasons). --- sbin/fsdb/fsdb.8 | 7 ++++++- sbin/fsdb/fsdb.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sbin/fsdb/fsdb.8 b/sbin/fsdb/fsdb.8 index 92469f3990ff..a55a56f6586c 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 aba9f1b97adc..39935812ac32 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,