Changeset 745 for trunk/server/source3/lib/popt_common.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/lib/popt_common.c
r414 r745 22 22 23 23 #include "includes.h" 24 #include "system/filesys.h" 25 #include "popt_common.h" 24 26 25 27 /* Handle command line options: … … 34 36 */ 35 37 36 extern bool AllowDebugChange; 38 enum {OPT_OPTION=1}; 39 37 40 extern bool override_logfile; 38 41 … … 96 99 97 100 switch(opt->val) { 101 case OPT_OPTION: 102 if (!lp_set_option(arg)) { 103 fprintf(stderr, "Error setting option '%s'\n", arg); 104 exit(1); 105 } 106 break; 107 98 108 case 'd': 99 109 if (arg) { 100 debug_parse_levels(arg); 101 AllowDebugChange = False; 110 lp_set_cmdline("log level", arg); 102 111 } 103 112 break; … … 164 173 { "log-basename", 'l', POPT_ARG_STRING, NULL, 'l', "Base name for log files", "LOGFILEBASE" }, 165 174 { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" }, 175 { "option", 0, POPT_ARG_STRING, NULL, OPT_OPTION, "Set smb.conf option from command line", "name=value" }, 166 176 POPT_TABLEEND 167 177 }; … … 185 195 }; 186 196 197 struct poptOption popt_common_option[] = { 198 { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_POST, (void *)popt_common_callback }, 199 { "option", 0, POPT_ARG_STRING, NULL, OPT_OPTION, "Set smb.conf option from command line", "name=value" }, 200 POPT_TABLEEND 201 }; 187 202 188 203 /* Handle command line options:
Note:
See TracChangeset
for help on using the changeset viewer.