diff options
-rw-r--r-- | source3/include/popt_common.h | 2 | ||||
-rw-r--r-- | source3/lib/popt_common.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index f77f69dfa4..1d3cc57acd 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -25,6 +25,7 @@ /* Common popt structures */ extern struct poptOption popt_common_samba[]; extern struct poptOption popt_common_connection[]; +extern struct poptOption popt_common_configfile[]; extern struct poptOption popt_common_version[]; extern struct poptOption popt_common_credentials[]; extern const struct poptOption popt_common_dynconfig[]; @@ -36,6 +37,7 @@ extern const struct poptOption popt_common_dynconfig[]; #define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_samba, 0, "Common samba options:", NULL }, #define POPT_COMMON_CONNECTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_connection, 0, "Connection options:", NULL }, #define POPT_COMMON_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version, 0, "Common samba options:", NULL }, +#define POPT_COMMON_CONFIGFILE { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile, 0, "Common samba config:", NULL }, #define POPT_COMMON_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, #define POPT_COMMON_DYNCONFIG { NULL, 0, POPT_ARG_INCLUDE_TABLE, \ CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \ diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index bc67a0fa28..b3a84a6f7c 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -150,6 +150,12 @@ struct poptOption popt_common_samba[] = { POPT_TABLEEND }; +struct poptOption popt_common_configfile[] = { + { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *)popt_common_callback }, + { "configfile", 0, POPT_ARG_STRING, NULL, 's', "Use alternate configuration file", "CONFIGFILE" }, + POPT_TABLEEND +}; + struct poptOption popt_common_version[] = { { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback }, { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" }, |