kbuild: un-stringnify KBUILD_MODNAME
Now when kbuild passes KBUILD_MODNAME with "" do not __stringify it when used. Remove __stringnify for all users. This also fixes the output of: $ ls -l /sys/module/ drwxr-xr-x 4 root root 0 2006-01-05 14:24 pcmcia drwxr-xr-x 4 root root 0 2006-01-05 14:24 pcmcia_core drwxr-xr-x 3 root root 0 2006-01-05 14:24 "processor" drwxr-xr-x 3 root root 0 2006-01-05 14:24 "psmouse" The quoting of the module names will be gone again. Thanks to GregKH + Kay Sievers for reproting this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
@ -49,8 +49,6 @@ static struct security_operations capability_ops = {
|
||||
.vm_enough_memory = cap_vm_enough_memory,
|
||||
};
|
||||
|
||||
#define MY_NAME __stringify(KBUILD_MODNAME)
|
||||
|
||||
/* flag to keep track of how we were registered */
|
||||
static int secondary;
|
||||
|
||||
@ -67,7 +65,7 @@ static int __init capability_init (void)
|
||||
/* register ourselves with the security framework */
|
||||
if (register_security (&capability_ops)) {
|
||||
/* try registering with primary module */
|
||||
if (mod_reg_security (MY_NAME, &capability_ops)) {
|
||||
if (mod_reg_security (KBUILD_MODNAME, &capability_ops)) {
|
||||
printk (KERN_INFO "Failure registering capabilities "
|
||||
"with primary security module.\n");
|
||||
return -EINVAL;
|
||||
@ -85,7 +83,7 @@ static void __exit capability_exit (void)
|
||||
return;
|
||||
/* remove ourselves from the security framework */
|
||||
if (secondary) {
|
||||
if (mod_unreg_security (MY_NAME, &capability_ops))
|
||||
if (mod_unreg_security (KBUILD_MODNAME, &capability_ops))
|
||||
printk (KERN_INFO "Failure unregistering capabilities "
|
||||
"with primary module.\n");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user