lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090211202601.GC3402@ldl.fc.hp.com>
Date:	Wed, 11 Feb 2009 13:26:01 -0700
From:	Alex Chiang <achiang@...com>
To:	gregkh@...e.de
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] sysfs: sysfs_add_one tells you _where_ the duplicate file
	is

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@...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;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ