git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1057ed
)
print the list of valid debug level literals when an invalid debug level
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Tue, 2 Dec 2008 03:08:10 +0000
(14:08 +1100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Tue, 2 Dec 2008 03:08:10 +0000
(14:08 +1100)
is specified in 'ctdb setdebug'
tools/ctdb.c
patch
|
blob
|
history
diff --git
a/tools/ctdb.c
b/tools/ctdb.c
index c9656fe9794679eabeff8b70030cf1c869a449f1..d6240ea03db475eff5e4db04e9f0bc3040d6c803 100644
(file)
--- a/
tools/ctdb.c
+++ b/
tools/ctdb.c
@@
-1812,7
+1812,13
@@
static int32_t get_debug_by_desc(const char *desc)
return debug_levels[i].level;
}
}
- return DEBUG_ERR;
+
+ fprintf(stderr, "Invalid debug level '%s'\nMust be one of\n", desc);
+ for (i=0;i<ARRAY_SIZE(debug_levels);i++) {
+ fprintf(stderr, " %s\n", debug_levels[i].description);
+ }
+
+ exit(10);
}
/*