summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-20 11:18:21 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-20 11:18:21 (EDT)
commitcd1c89493b99c72fcccae88cc1ca4393ce02b3a6 (patch)
treee86c751facf2f28be1d4c44a6cef32ff160033f1 /src
parent3b57da5f33c2aa6fb35c1f2c1531aa977ae634e6 (diff)
main: Check for at least one option
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index b83e35f..7a0efd5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -205,6 +205,12 @@ main(int argc, char *argv[])
_help_tip(program_name);
return EXIT_FAILURE;
}
+ if (control_files == NULL && list_members == 0) {
+ fprintf(stderr, "%s: At least one of -I, -f, or -c must be "
+ "given\n", program_name);
+ _help_tip(program_name);
+ return EXIT_FAILURE;
+ }
/* Initialize outer archive. */
opk = opkg_opk_opk_init(argv[0]);