From f3ae025e3b9aeafca272d60a348c2bf7b665aa09 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Thu, 12 May 2011 15:43:04 -0700 Subject: [PATCH] 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 --- libcfs/libcfs/debug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 1.8.3.1