summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-15 11:26:11 +0200
committerMichael Adam <obnox@samba.org>2008-07-15 13:03:24 +0200
commitdbac75b466831cade91dfad21a2bcbe4bd551b37 (patch)
tree1e05c09fa33d428e597a3d7156b9cc366e8f5f4b /source3
parent4ce6f3e7dd5b3464a7819c597d646702b5e82327 (diff)
downloadsamba-dbac75b466831cade91dfad21a2bcbe4bd551b37.tar.gz
samba-dbac75b466831cade91dfad21a2bcbe4bd551b37.tar.bz2
samba-dbac75b466831cade91dfad21a2bcbe4bd551b37.zip
popt: add a popt_common_debuglevel set of options providing -d|--debuglevel
Michael (This used to be commit e7d08b673066a63aaa7ab54ac59566ae8a975672)
Diffstat (limited to 'source3')
-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 c889d2e6e6..bbd013a18f 100644
--- a/source3/include/popt_common.h
+++ b/source3/include/popt_common.h
@@ -28,6 +28,7 @@ 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 struct poptOption popt_common_debuglevel[];
extern const struct poptOption popt_common_dynconfig[];
#ifndef POPT_TABLEEND
@@ -42,6 +43,7 @@ extern const struct poptOption popt_common_dynconfig[];
#define POPT_COMMON_DYNCONFIG { NULL, 0, POPT_ARG_INCLUDE_TABLE, \
CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \
"Build-time configuration overrides:", NULL },
+#define POPT_COMMON_DEBUGLEVEL { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debuglevel, 0, "Common samba debugging:", NULL },
struct user_auth_info {
char *username;
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index 25e41ab5f3..b151f22742 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -171,6 +171,12 @@ struct poptOption popt_common_version[] = {
POPT_TABLEEND
};
+struct poptOption popt_common_debuglevel[] = {
+ { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback },
+ { "debuglevel", 'd', POPT_ARG_STRING, NULL, 'd', "Set debug level", "DEBUGLEVEL" },
+ POPT_TABLEEND
+};
+
/* Handle command line options:
* --sbindir