linux/fs/sysfs
Alex Chiang 425cb02912 sysfs: sysfs_add_one WARNs with full path to duplicate filename
sysfs: sysfs_add_one WARNs with full path to duplicate filename

As a debugging aid, it can be useful to know the full path to a
duplicate file being created in sysfs.

We now will display warnings such as:

	sysfs: cannot create duplicate filename '/foo'

when attempting to create multiple files named 'foo' in the sysfs
root, or:

	sysfs: cannot create duplicate filename '/bus/pci/slots/5/foo'

when attempting to create multiple files named 'foo' under a
given directory in sysfs.

The path displayed is always a relative path to sysfs_root. The
leading '/' in the path name refers to the sysfs_root mount
point, and should not be confused with the "real" '/'.

Thanks to Alex Williamson for essentially writing sysfs_pathname.

Cc: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:38:25 -07:00
..
bin.c sysfs: fix problems with binary files 2009-01-20 20:52:09 -08:00
dir.c sysfs: sysfs_add_one WARNs with full path to duplicate filename 2009-03-24 16:38:25 -07:00
file.c sysfs: Make dir and name args to sysfs_notify() const 2008-10-16 09:24:51 -07:00
group.c Use WARN() in fs/sysfs 2008-07-26 12:00:07 -07:00
inode.c zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
Kconfig fs/Kconfig: move sysfs out 2009-01-22 13:15:56 +03:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mount.c sysfs: Take sysfs_mutex when fetching the root inode. 2009-03-24 16:38:24 -07:00
symlink.c driver core: Suppress sysfs warnings for device_rename(). 2008-07-21 21:55:01 -07:00
sysfs.h sysfs: Support sysfs_notify from atomic context with new sysfs_notify_dirent 2008-10-16 09:24:47 -07:00