summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-03 14:00:55 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-03 14:00:55 +0200
commit5380c605440db063f8b80a2a48b326a8ce9b0d93 (patch)
treec8572a2238e7a1509c104e56f4d4f40090b2ad7f /bin
parentd9b79c78f4ceac5a6a271b61f7addb02d504efd8 (diff)
Fix: unify extra argument rejection in tar2sqfs & gensquashfs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin')
-rw-r--r--bin/gensquashfs/options.c5
-rw-r--r--bin/tar2sqfs.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bin/gensquashfs/options.c b/bin/gensquashfs/options.c
index 348ebba..b432a46 100644
--- a/bin/gensquashfs/options.c
+++ b/bin/gensquashfs/options.c
@@ -311,6 +311,11 @@ void process_command_line(options_t *opt, int argc, char **argv)
}
opt->cfg.filename = argv[optind++];
+
+ if (optind < argc) {
+ fputs("Unknown extra arguments specified.\n", stderr);
+ goto fail_arg;
+ }
return;
fail_arg:
fputs("Try `gensquashfs --help' for more information.\n", stderr);
diff --git a/bin/tar2sqfs.c b/bin/tar2sqfs.c
index 6025dc9..bdd36e1 100644
--- a/bin/tar2sqfs.c
+++ b/bin/tar2sqfs.c
@@ -239,7 +239,7 @@ static void process_args(int argc, char **argv)
cfg.filename = argv[optind++];
if (optind < argc) {
- fputs("Unknown extra arguments\n", stderr);
+ fputs("Unknown extra arguments specified.\n", stderr);
goto fail_arg;
}
return;