diff options
author | James Peach <jpeach@samba.org> | 2006-02-06 23:01:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:51 -0500 |
commit | 716b0ee234d7c7fbfb0ea93eebc39c204899f21c (patch) | |
tree | be535192cfb576e9d31b9eb346f01892d148ccca /source4 | |
parent | f7def09a1ec105294b189c0d933f59977a252057 (diff) | |
download | samba-716b0ee234d7c7fbfb0ea93eebc39c204899f21c.tar.gz samba-716b0ee234d7c7fbfb0ea93eebc39c204899f21c.tar.bz2 samba-716b0ee234d7c7fbfb0ea93eebc39c204899f21c.zip |
r13373: Implement the -p option for smbtorture.
(This used to be commit fc17a50b48189c60af60b9163695b48c6b87c5c7)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/torture.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 9eded4d29e..a7e0fdd52d 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -2556,10 +2556,12 @@ static void max_runtime_handler(int sig) int argc_new; char **argv_new; poptContext pc; - enum {OPT_LOADFILE=1000,OPT_UNCLIST,OPT_TIMELIMIT,OPT_DNS,OPT_DANGEROUS}; + enum {OPT_LOADFILE=1000,OPT_UNCLIST,OPT_TIMELIMIT,OPT_DNS, + OPT_DANGEROUS,OPT_SMB_PORTS}; + struct poptOption long_options[] = { POPT_AUTOHELP - {"smb-ports", 'p', POPT_ARG_STRING, NULL, 0, "SMB ports", NULL}, + {"smb-ports", 'p', POPT_ARG_STRING, NULL, OPT_SMB_PORTS, "SMB ports", NULL}, {"seed", 0, POPT_ARG_INT, &torture_seed, 0, "seed", NULL}, {"num-progs", 0, POPT_ARG_INT, &torture_nprocs, 0, "num progs", NULL}, {"num-ops", 0, POPT_ARG_INT, &torture_numops, 0, "num ops", NULL}, @@ -2607,6 +2609,9 @@ static void max_runtime_handler(int sig) case OPT_DANGEROUS: lp_set_cmdline("torture:dangerous", "Yes"); break; + case OPT_SMB_PORTS: + lp_set_cmdline("smb ports", poptGetOptArg(pc)); + break; default: d_printf("Invalid option %s: %s\n", poptBadOption(pc, 0), poptStrerror(opt)); |