From: Alex Chiang <achiang@hp.com>
To: gregkh@suse.de
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] sysfs: sysfs_add_one tells you _where_ the duplicate file is
Date: Wed, 11 Feb 2009 13:26:01 -0700 [thread overview]
Message-ID: <20090211202601.GC3402@ldl.fc.hp.com> (raw)
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;
}
next reply other threads:[~2009-02-11 20:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 20:26 Alex Chiang [this message]
2009-02-11 22:39 ` [PATCH] sysfs: sysfs_add_one tells you _where_ the duplicate file is 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090211202601.GC3402@ldl.fc.hp.com \
--to=achiang@hp.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox