Whamcloud - gitweb
b=5514
authorjacob <jacob>
Fri, 7 Jan 2005 19:42:55 +0000 (19:42 +0000)
committerjacob <jacob>
Fri, 7 Jan 2005 19:42:55 +0000 (19:42 +0000)
r=adilger

Remove full paths of files in debug logs.

lnet/libcfs/tracefile.c

index f0c06e5..6018a3d 100644 (file)
@@ -207,6 +207,9 @@ void portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         unsigned long flags;
         struct timeval tv;
 
+        if (strchr(file, '/'))
+                file = strrchr(file, '/') + 1;
+
         if (*(format + strlen(format) - 1) != '\n')
                 printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n",
                        file, line, fn);