Changeset 22 for trunk/samba/source/utils/smbcontrol.c
- Timestamp:
- Mar 25, 2007, 5:18:51 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/samba/source/utils/smbcontrol.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/utils/smbcontrol.c
r1 r22 1146 1146 int opt; 1147 1147 1148 static struct poptOption wbinfo_options[] = { 1148 static struct poptOption long_options[] = { 1149 POPT_AUTOHELP 1149 1150 { "timeout", 't', POPT_ARG_INT, &timeout, 't', 1150 1151 "Set timeout value in seconds", "TIMEOUT" }, 1151 1152 1152 { "configfile", 's', POPT_ARG_STRING, NULL, 's', 1153 "Use alternative configuration file", "CONFIGFILE" }, 1154 1155 POPT_TABLEEND 1156 }; 1157 1158 struct poptOption options[] = { 1159 { NULL, 0, POPT_ARG_INCLUDE_TABLE, wbinfo_options, 0, 1160 "Options" }, 1161 1162 POPT_AUTOHELP 1163 POPT_COMMON_VERSION 1153 POPT_COMMON_SAMBA 1164 1154 POPT_TABLEEND 1165 1155 }; … … 1172 1162 1173 1163 pc = poptGetContext( 1174 "smbcontrol", argc, (const char **)argv, options, 0);1164 "smbcontrol", argc, (const char **)argv, options, 0); 1175 1165 1176 1166 poptSetOtherOptionHelp(pc, "[OPTION...] <destination> <message-type> " … … 1183 1173 switch(opt) { 1184 1174 case 't': /* --timeout */ 1185 argc -= 2;1186 break;1187 case 's': /* --configfile */1188 pstrcpy(dyn_CONFIGFILE, poptGetOptArg(pc));1189 argc -= 2;1190 1175 break; 1191 1176 default: … … 1201 1186 1202 1187 argv = (const char **)poptGetArgs(pc); 1203 argc--; /* Don't forget about argv[0] */ 1188 argc = 0; 1189 while (argv[argc] != NULL) { 1190 argc++; 1191 } 1204 1192 1205 1193 if (argc == 1)
Note:
See TracChangeset
for help on using the changeset viewer.
