From 2a570855f5674027ddd7ceb698705b9a8cc8ffc7 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 21 Oct 2011 15:45:17 -0600 Subject: [PATCH] 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 --- libcfs/libcfs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); -- 1.8.3.1