[s3]popt: add a --configsource command line flag to popt_common_samba.
authorMichael Adam <obnox@samba.org>
Thu, 17 Apr 2008 07:57:41 +0000 (09:57 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 12 Nov 2008 12:09:27 +0000 (13:09 +0100)
Keep --configfile as a synonym, also setting dyn_CONFIGSOURCE (!)

Michael

source3/lib/popt_common.c

index 4a3f1e0a57605751924f171cee36c524b65ed658..f2335edc349deaf805e7e4f7402d695f2efa320f 100644 (file)
@@ -24,7 +24,7 @@
 
 /* Handle command line options:
  *             -d,--debuglevel 
- *             -s,--configfile 
+ *             -s,--configsource
  *             -O,--socket-options 
  *             -V,--version
  *             -l,--log-base
@@ -107,7 +107,7 @@ static void popt_common_callback(poptContext con,
 
        case 's':
                if (arg) {
-                       set_dyn_CONFIGFILE(arg);
+                       set_dyn_CONFIGSOURCE(arg);
                }
                break;
 
@@ -153,7 +153,8 @@ struct poptOption popt_common_connection[] = {
 struct poptOption popt_common_samba[] = {
        { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *)popt_common_callback },
        { "debuglevel", 'd', POPT_ARG_STRING, NULL, 'd', "Set debug level", "DEBUGLEVEL" },
-       { "configfile", 's', POPT_ARG_STRING, NULL, 's', "Use alternate configuration file", "CONFIGFILE" },
+       { "configsource", 's', POPT_ARG_STRING, NULL, 's', "Use alternate configuration source", "CONFIGSOURCE" },
+       { "configfile", 0, POPT_ARG_STRING, NULL, 's', "Use alternate configuration file", "CONFIGFILE" },
        { "log-basename", 'l', POPT_ARG_STRING, NULL, 'l', "Base name for log files", "LOGFILEBASE" },
        { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" },
        POPT_TABLEEND