summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-12-14 19:36:14 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-14 19:36:14 +0100
commit16352dd60b359343520d3d613f92865bba8c9a2c (patch)
treec78d32f87b2cf28924882d398c395be17ab60f36
parent4130053a5784122278fc02a8eb579f3cf81a1b0e (diff)
downloadsamba-16352dd60b359343520d3d613f92865bba8c9a2c.tar.gz
samba-16352dd60b359343520d3d613f92865bba8c9a2c.tar.bz2
samba-16352dd60b359343520d3d613f92865bba8c9a2c.zip
add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)
metze (This used to be commit af3392cc20942158ac9e0a533799c5904ff23347)
-rw-r--r--source3/include/popt_common.h2
-rw-r--r--source3/lib/popt_common.c6
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" },