Whamcloud - gitweb
LU-5409 obd: add CFS_FAULT_CHECK()
[fs/lustre-release.git] / libcfs / libcfs / debug.c
index 0691471..417a494 100644 (file)
@@ -52,7 +52,7 @@ CFS_MODULE_PARM(libcfs_subsystem_debug, "i", int, 0644,
 EXPORT_SYMBOL(libcfs_subsystem_debug);
 
 unsigned int libcfs_debug = (D_CANTMASK |
-                             D_NETERROR | D_HA | D_CONFIG | D_IOCTL);
+                            D_NETERROR | D_HA | D_CONFIG | D_IOCTL | D_LFSCK);
 CFS_MODULE_PARM(libcfs_debug, "i", int, 0644,
                 "Lustre kernel debug mask");
 EXPORT_SYMBOL(libcfs_debug);
@@ -300,11 +300,11 @@ int libcfs_debug_init(unsigned long bufsize)
                libcfs_console_min_delay = CDEBUG_DEFAULT_MIN_DELAY;
        }
 
-        if (libcfs_debug_file_path != NULL) {
-                memset(libcfs_debug_file_path_arr, 0, PATH_MAX);
-                strncpy(libcfs_debug_file_path_arr, 
-                        libcfs_debug_file_path, PATH_MAX-1);
-        }
+       if (libcfs_debug_file_path != NULL) {
+               strlcpy(libcfs_debug_file_path_arr,
+                       libcfs_debug_file_path,
+                       sizeof(libcfs_debug_file_path_arr));
+       }
 
        /* If libcfs_debug_mb is set to an invalid value or uninitialized
         * then just make the total buffers smp_num_cpus * TCD_MAX_PAGES */