public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sysfs: sysfs_add_one tells you _where_ the duplicate file is
@ 2009-02-11 20:26 Alex Chiang
  2009-02-11 22:39 ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Chiang @ 2009-02-11 20:26 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Give a better clue about where we might be creating duplicate
files by displaying the parent's name as well.

Signed-off-by: Alex Chiang <achiang@hp.com>
---
It would be nice to get a full path, but simply printing out the
parent is cheap and more useful than what we have now.

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 82d3b79..5828d1d 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -459,7 +459,8 @@ int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
 
 	ret = __sysfs_add_one(acxt, sd);
 	WARN(ret == -EEXIST, KERN_WARNING "sysfs: duplicate filename '%s' "
-		       "can not be created\n", sd->s_name);
+		       "can not be created in %s\n",
+		       sd->s_name, acxt->parent_sd->s_name);
 	return ret;
 }
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-02-12 17:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 20:26 [PATCH] sysfs: sysfs_add_one tells you _where_ the duplicate file is Alex Chiang
2009-02-11 22:39 ` Greg KH
2009-02-12  2:56   ` Alex Chiang
2009-02-12  3:02     ` Greg KH
2009-02-12  7:02       ` Alex Chiang
2009-02-12  9:05         ` Kay Sievers
2009-02-12 16:02           ` Greg KH
2009-02-12 17:38             ` Alex Chiang
2009-02-12 17:41               ` Greg KH
2009-02-12 17:56                 ` Alex Chiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox