]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: sysfs_add_one WARNs with full path to duplicate filename
authorAlex Chiang <achiang@hp.com>
Thu, 12 Feb 2009 17:56:59 +0000 (10:56 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Mar 2009 23:38:25 +0000 (16:38 -0700)
commitf6a63ff44a92a8f06654c409f5d9e347aac313a6
treed7cbd6309c280714a3dc45d968129128d649be22
parent2879d54e002acea59adf5964e801ae42b7c027f5
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>
fs/sysfs/dir.c