Skip to content

Commit

Permalink
proc: more debugging for "already registered" case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Sep 13, 2008
1 parent a551b98 commit 665020c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 665020c

Please sign in to comment.