diff options
author | Ralph Boehme <slow@samba.org> | 2021-09-10 07:04:21 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2021-09-10 15:10:30 +0000 |
commit | 96ab7909bd9eea14ba3aad535c28d53c184341a2 (patch) | |
tree | c0a9c585241255d974fb37239fc7b08efcc816db /source3/torture/vfstest.c | |
parent | e3c5516dc578aee25aaaac1ab7a66ede9d313be0 (diff) | |
download | samba-96ab7909bd9eea14ba3aad535c28d53c184341a2.tar.gz |
vfstest: don't ignore unknown options
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/torture/vfstest.c')
-rw-r--r-- | source3/torture/vfstest.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 5c0ef2d073d..3f01c431289 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -469,6 +469,7 @@ int main(int argc, const char *argv[]) struct cmd_set **cmd_set; struct conn_struct_tos *c = NULL; struct vfs_state *vfs; + int opt; int i; char *filename = NULL; char *cwd = NULL; @@ -531,8 +532,15 @@ int main(int argc, const char *argv[]) exit(1); } - while(poptGetNextOpt(pc) != -1); - + while ((opt = poptGetNextOpt(pc)) != -1) { + switch (opt) { + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + exit(1); + } + } poptFreeContext(pc); |