summaryrefslogtreecommitdiffstats
path: root/sbin/fsdb/fsdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsdb/fsdb.c')
-rw-r--r--sbin/fsdb/fsdb.c11
1 files changed, 9 insertions, 2 deletions
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