svn commit: samba r13373 - in branches/SAMBA_4_0/source/torture: .

jpeach at samba.org jpeach at samba.org
Mon Feb 6 23:01:18 GMT 2006


Author: jpeach
Date: 2006-02-06 23:01:17 +0000 (Mon, 06 Feb 2006)
New Revision: 13373

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13373

Log:
Implement the -p option for smbtorture.

Modified:
   branches/SAMBA_4_0/source/torture/torture.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c	2006-02-06 22:55:34 UTC (rev 13372)
+++ branches/SAMBA_4_0/source/torture/torture.c	2006-02-06 23:01:17 UTC (rev 13373)
@@ -2556,10 +2556,12 @@
 	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 @@
 		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));



More information about the samba-cvs mailing list