From: Andreas Dilger Date: Fri, 21 Oct 2011 21:45:17 +0000 (-0600) Subject: LU-000 libcfs: allow debug to be set to numeric -1 X-Git-Tag: 2.1.52~17 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2a570855f5674027ddd7ceb698705b9a8cc8ffc7;p=fs%2Flustre-release.git LU-000 libcfs: allow debug to be set to numeric -1 Don't warn if debug is set to "-1", which should always mean "enable all debugging". Signed-off-by: Andreas Dilger Change-Id: I1503d2f5776043e9a4ec3bc4af710ae35ca97960 Reviewed-on: http://review.whamcloud.com/1577 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- diff --git a/libcfs/libcfs/debug.c b/libcfs/libcfs/debug.c index 00fbb56..fb93ac2 100644 --- a/libcfs/libcfs/debug.c +++ b/libcfs/libcfs/debug.c @@ -319,8 +319,8 @@ libcfs_debug_str2mask(int *mask, const char *str, int is_subsys) if ((t = sscanf(str, "%i%n", &m, &matched)) >= 1 && matched == n) { - /* don't print warning for lctl set_param debug=0 */ - if (m != 0) + /* don't print warning for lctl set_param debug=0 or -1 */ + if (m != 0 && m != -1) CWARN("You are trying to use a numerical value for the " "mask - this will be deprecated in a future " "release.\n");