summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-06-13 05:36:28 +0000
committerTim Potter <tpot@samba.org>2001-06-13 05:36:28 +0000
commitdf8713fdb97eb7b0fee8b92f792c430c398851f3 (patch)
tree88730c308dd1a6ab7f5f355a253f7fdaa8be5157 /source3/utils
parent8209eda7742653ea7bb20ffa96b61bdb0c4dce87 (diff)
downloadsamba-df8713fdb97eb7b0fee8b92f792c430c398851f3.tar.gz
samba-df8713fdb97eb7b0fee8b92f792c430c398851f3.tar.bz2
samba-df8713fdb97eb7b0fee8b92f792c430c398851f3.zip
Renamed -d option (make verbose) on smbstatus to -v.
Added -d <debuglevel> option. (This used to be commit bdb9714380503d5bbe12a8bfa4ec723e1f5070ca)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/status.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index e695e7572f..448239baba 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -245,7 +245,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
int c;
static pstring servicesf = CONFIGFILE;
extern char *optarg;
- int profile_only = 0;
+ int profile_only = 0, new_debuglevel = -1;
TDB_CONTEXT *tdb;
struct session_record *ptr;
@@ -262,7 +262,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
return(1);
}
- while ((c = getopt(argc, argv, "pdLSs:u:bPB")) != EOF) {
+ while ((c = getopt(argc, argv, "pvLSs:u:bPBd:")) != EOF) {
switch (c) {
case 'b':
brief = 1;
@@ -271,6 +271,10 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
show_brl = 1;
break;
case 'd':
+ new_debuglevel = atoi(optarg);
+ break;
+
+ case 'v':
verbose = 1;
break;
case 'L':
@@ -292,7 +296,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
Ucrit_addUsername(optarg);
break;
default:
- fprintf(stderr, "Usage: %s [-P] [-d] [-L] [-p] [-S] [-s configfile] [-u username]\n", *argv);
+ fprintf(stderr, "Usage: %s [-P] [-v] [-L] [-p] [-S] [-s configfile] [-u username] [-d debuglevel]\n", *argv);
return (-1);
}
}
@@ -302,6 +306,10 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
return (-1);
}
+ if (new_debuglevel != -1) {
+ DEBUGLEVEL = new_debuglevel;
+ }
+
if (verbose) {
printf("using configfile = %s\n", servicesf);
}