diff options
author | Patrick 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) |
commit | cd1c89493b99c72fcccae88cc1ca4393ce02b3a6 (patch) | |
tree | e86c751facf2f28be1d4c44a6cef32ff160033f1 /src | |
parent | 3b57da5f33c2aa6fb35c1f2c1531aa977ae634e6 (diff) |
main: Check for at least one option
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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]); |