Whamcloud - gitweb
b=17682 Improve debug capability for production systems
authorDmitry Zogin <dmitry.zoguine@oracle.com>
Fri, 20 Aug 2010 14:50:07 +0000 (18:50 +0400)
committerMikhail Pershin <tappro@sun.com>
Fri, 20 Aug 2010 19:49:02 +0000 (23:49 +0400)
 Add a warning, when debug/subsystem_debug masks are set by
 numerical values, rather than by symbolic names.

libcfs/libcfs/debug.c

index f8da94a..be2db8e 100644 (file)
@@ -316,6 +316,8 @@ libcfs_debug_str2mask(int *mask, const char *str, int is_subsys)
 
         if ((t = sscanf(str, "%i%n", &m, &matched)) >= 1 &&
             matched == n) {
 
         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");
                 *mask = m;
                 return 0;
         }
                 *mask = m;
                 return 0;
         }