OSDN Git Service

proc: more debugging for "already registered" case
authorAlexey Dobriyan <adobriyan@gmail.com>
Sat, 13 Sep 2008 09:33:06 +0000 (02:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Sep 2008 21:41:50 +0000 (14:41 -0700)
Print parent directory name as well.

The aim is to catch non-creation of parent directory when proc_mkdir will
return NULL and all subsequent registrations go directly in /proc instead
of intended directory.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Fixed insane printk string while at it.  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/generic.c

index bca0f81..7821589 100644 (file)
@@ -547,8 +547,8 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp
 
        for (tmp = dir->subdir; tmp; tmp = tmp->next)
                if (strcmp(tmp->name, dp->name) == 0) {
-                       printk(KERN_WARNING "proc_dir_entry '%s' already "
-                                       "registered\n", dp->name);
+                       printk(KERN_WARNING "proc_dir_entry '%s/%s' already registered\n",
+                               dir->name, dp->name);
                        dump_stack();
                        break;
                }