summaryrefslogtreecommitdiff
path: root/ztcfg.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-01-10 04:06:49 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-01-10 04:06:49 +0000
commit03172ff5259d9253f0f3a660f18836c6a90a2fc7 (patch)
tree2fc022bd2341ed9f1cc93bbd1020cacae80a2f9e /ztcfg.c
parent9876c922836d47092ec40e3f09e236f59d96af4b (diff)
Make debug settable (thanks twisted, bug #3302)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@535 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztcfg.c')
-rwxr-xr-xztcfg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ztcfg.c b/ztcfg.c
index 52a09a1..a1a8a72 100755
--- a/ztcfg.c
+++ b/ztcfg.c
@@ -1096,6 +1096,7 @@ static void usage(char *argv0, int exitcode)
" -c <filename> -- Use <filename> instead of " CONFIG_FILENAME "\n"
" -h -- Generate this help statement\n"
" -v -- Verbose (more -v's means more verbose)\n"
+ " -d [level] -- Generate debugging output. (Default level is 1.)\n"
" -t -- Test mode only, do not apply\n"
" -s -- Shutdown spans only\n"
,c);
@@ -1108,7 +1109,7 @@ int main(int argc, char *argv[])
char *buf;
char *key, *value;
int x,found;
- while((c = getopt(argc, argv, "thc:vs")) != -1) {
+ while((c = getopt(argc, argv, "thc:vsd::")) != -1) {
switch(c) {
case 'c':
filename=optarg;
@@ -1128,6 +1129,12 @@ int main(int argc, char *argv[])
case 's':
stopmode = 1;
break;
+ case 'd':
+ if (optarg)
+ debug = atoi(optarg);
+ else
+ debug = 1;
+ break;
}
}
if (fd == -1) fd = open(MASTER_DEVICE, O_RDWR);