From: Johann Lombardi Date: Thu, 12 May 2011 22:43:04 +0000 (-0700) Subject: LU-314 don't print warning when setting debug mask to 0 X-Git-Tag: 2.0.61.0~5 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=f3ae025e3b9aeafca272d60a348c2bf7b665aa09 LU-314 don't print warning when setting debug mask to 0 Change-Id: Ib54bc2fd42603065aa200475ff30e69bafa91e9d Signed-off-by: Johann Lombardi Reviewed-on: http://review.whamcloud.com/544 Tested-by: Hudson Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin --- diff --git a/libcfs/libcfs/debug.c b/libcfs/libcfs/debug.c index de6e0da..fdd29e2 100644 --- a/libcfs/libcfs/debug.c +++ b/libcfs/libcfs/debug.c @@ -316,8 +316,11 @@ libcfs_debug_str2mask(int *mask, const char *str, int is_subsys) if ((t = sscanf(str, "%i%n", &m, &matched)) >= 1 && matched == n) { - CWARN("You are trying to use a numerical value for the mask -" - " this will be deprecated in a future release.\n"); + /* don't print warning for lctl set_param debug=0 */ + if (m != 0) + CWARN("You are trying to use a numerical value for the " + "mask - this will be deprecated in a future " + "release.\n"); *mask = m; return 0; }