]> Git Repo - linux.git/commitdiff
driver core: print sysfs attribute name when warning about bogus permissions
author[email protected] <[email protected]>
Thu, 16 May 2013 06:31:30 +0000 (14:31 +0800)
committerGreg Kroah-Hartman <[email protected]>
Tue, 21 May 2013 16:05:52 +0000 (09:05 -0700)
Make it obvious to see what attribute is using bogus permissions.

Signed-off-by: Dave Young <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/base/core.c

index 016312437577ca3378706560a77068dcda67de81..2499cefdcdf2429d9503506d5514a4943f9ec4e1 100644 (file)
@@ -572,9 +572,11 @@ int device_create_file(struct device *dev,
 
        if (dev) {
                WARN(((attr->attr.mode & S_IWUGO) && !attr->store),
-                               "Write permission without 'store'\n");
+                       "Attribute %s: write permission without 'store'\n",
+                       attr->attr.name);
                WARN(((attr->attr.mode & S_IRUGO) && !attr->show),
-                               "Read permission without 'show'\n");
+                       "Attribute %s: read permission without 'show'\n",
+                       attr->attr.name);
                error = sysfs_create_file(&dev->kobj, &attr->attr);
        }
 
This page took 0.053802 seconds and 4 git commands to generate.