Whamcloud - gitweb
LU-314 don't print warning when setting debug mask to 0
authorJohann Lombardi <johann@whamcloud.com>
Thu, 12 May 2011 22:43:04 +0000 (15:43 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 May 2011 17:02:48 +0000 (10:02 -0700)
Change-Id: Ib54bc2fd42603065aa200475ff30e69bafa91e9d
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/544
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/debug.c

index de6e0da..fdd29e2 100644 (file)
@@ -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;
         }