Remove deprecated parameters
PATCH 3/22 Remove deprecated parameters
Remove the deprecated asus_uid and asus_gid parameters.
--- asus_acpi.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-)
drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +2 -11
@@ -76,13 +76,6 @@ MODULE_DESCRIPTION(ACPI_HOTK_NAME); MODULE_LICENSE("GPL"); -static uid_t asus_uid; -static gid_t asus_gid; -module_param(asus_uid, uint, 0); -MODULE_PARM_DESC(asus_uid, "UID for entries in /proc/acpi/asus.\n"); -module_param(asus_gid, uint, 0); -MODULE_PARM_DESC(asus_gid, "GID for entries in /proc/acpi/asus.\n"); - /* For each model, all features implemented, * those marked with R are relative to HOTK, A for absolute */ struct model_data {
@@ -916,8 +909,8 @@ proc->read_proc = readfunc; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE; - proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; return 0; }
@@ -926,19 +919,7 @@ struct proc_dir_entry *proc; mode_t mode; - /* - * If parameter uid or gid is not changed, keep the default setting
for
- * our proc entries (-rw-rw-rw-) else, it means we care about
security,
- * and then set to -rw-rw----
- */
-
- if ((asus_uid == 0) && (asus_gid == 0)) {
- mode = S_IFREG | S_IRUGO | S_IWUGO;
- } else {
- mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP;
- printk(KERN_WARNING " asus_uid and asus_gid parameters are "
- "deprecated, use chown and chmod instead!\n");
- }
+ mode = S_IFREG | S_IRUGO | S_IWUGO;
acpi_device_dir(device) = asus_proc_dir;
if (!acpi_device_dir(device))
@@ -949,8 +930,8 @@
proc->read_proc = proc_read_info;
proc->data = acpi_driver_data(device);
proc->owner = THIS_MODULE;
- proc->uid = asus_uid;
- proc->gid = asus_gid;
+ proc->uid = 0;
+ proc->gid = 0;
} else {
printk(KERN_WARNING " Unable to create " PROC_INFO
" fs entry\n");Signature · 2 lines
CHARY 'Iksaif' Corentin http://xf.iksaif.net
Quoted 1 line · On Tue, 19 Dec 2006 22:18:55 +0100 Corentin CHARY wrote:
Remove the deprecated
asus_uidandasus_gidparameters.
Hi,
Where are they documented as deprecated?
Thanks.
Quoted 69 lines
Signed-off-by Corentin Chary <[email protected]>--- asus_acpi.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-)drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +2
-11@@ -76,13 +76,6 @@ MODULE_DESCRIPTION(ACPI_HOTK_NAME); MODULE_LICENSE("GPL"); -static uid_t asus_uid; -static gid_t asus_gid; -module_param(asus_uid, uint, 0); -MODULE_PARM_DESC(asus_uid, "UID for entries in /proc/acpi/asus.\n"); -module_param(asus_gid, uint, 0); -MODULE_PARM_DESC(asus_gid, "GID for entries in /proc/acpi/asus.\n"); - /* For each model, all features implemented, * those marked with R are relative to HOTK, A for absolute */ struct model_data {@@ -916,8 +909,8 @@ proc->read_proc = readfunc; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE; - proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; return 0; }@@ -926,19 +919,7 @@ struct proc_dir_entry *proc; mode_t mode; - /* - * If parameter uid or gid is not changed, keep the default settingfor
- * our proc entries (-rw-rw-rw-) else, it means we care about
security,drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +3
-12- * and then set to -rw-rw---- - */ - - if ((asus_uid == 0) && (asus_gid == 0)) { - mode = S_IFREG | S_IRUGO | S_IWUGO; - } else { - mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; - printk(KERN_WARNING " asus_uid and asus_gid parameters are " - "deprecated, use chown and chmod instead!\n"); - } + mode = S_IFREG | S_IRUGO | S_IWUGO; acpi_device_dir(device) = asus_proc_dir; if (!acpi_device_dir(device))@@ -949,8 +930,8 @@ proc->read_proc = proc_read_info; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE; - proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; } else { printk(KERN_WARNING " Unable to create " PROC_INFO " fs entry\n");Signature · 1 line
--
---
~Randy
Just look the code ;)
Quoted 3 lines
Quoted 3 lines
- printk(KERN_WARNING "
asus_uidandasus_gidparameters
are " - "deprecated, use chown and chmod
instead!\n"); - }
Le mardi 19 décembre 2006 22:45, vous avez écrit :
Quoted 84 lines · On Tue, 19 Dec 2006 22:18:55 +0100 Corentin CHARY wrote:
Quoted 1 line
Remove the deprecated
asus_uidandasus_gidparameters.Hi,
Where are they documented as deprecated?Thanks.
Quoted 59 lines
Signed-off-by Corentin Chary <[email protected]>--- asus_acpi.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-)drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +2
-11@@ -76,13 +76,6 @@ MODULE_DESCRIPTION(ACPI_HOTK_NAME); MODULE_LICENSE("GPL"); -static uid_t asus_uid; -static gid_t asus_gid; -module_param(asus_uid, uint, 0); -MODULE_PARM_DESC(asus_uid, "UID for entries in /proc/acpi/asus.\n"); -module_param(asus_gid, uint, 0); -MODULE_PARM_DESC(asus_gid, "GID for entries in /proc/acpi/asus.\n"); - /* For each model, all features implemented, * those marked with R are relative to HOTK, A for absolute */ struct model_data {@@ -916,8 +909,8 @@ proc->read_proc = readfunc; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE; - proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; return 0; }@@ -926,19 +919,7 @@ struct proc_dir_entry *proc; mode_t mode; - /* - * If parameter uid or gid is not changed, keep the defaultsetting for
- * our proc entries (-rw-rw-rw-) else, it means we care about
security,drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +0
-8- * and then set to -rw-rw---- - */ - - if ((asus_uid == 0) && (asus_gid == 0)) { - mode = S_IFREG | S_IRUGO | S_IWUGO; - } else { - mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; - printk(KERN_WARNING " asus_uid and asus_gid parametersare " - "deprecated, use chown and chmod
instead!\n"); - }drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +1
-0+ mode = S_IFREG | S_IRUGO | S_IWUGO; acpi_device_dir(device) = asus_proc_dir; if (!acpi_device_dir(device))@@ -949,8 +930,8 @@ proc->read_proc = proc_read_info; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE;drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100
Quoted 10 lines
drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +2
-3- proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; } else { printk(KERN_WARNING " Unable to create " PROC_INFO " fs entry\n"); -----
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
CHARY 'Iksaif' Corentin http://xf.iksaif.net - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · On Tue, 19 Dec 2006 23:18:10 +0100 Corentin CHARY wrote:
Just look the code ;)
Quoted 3 lines
Quoted 3 lines
- printk(KERN_WARNING "
asus_uidandasus_gidparameters
are " - "deprecated, use chown and chmod
instead!\n"); - }
That's really not the right place for it.
See Documentation/feature-removal-schedule.txt .
Quoted 77 lines
Le mardi 19 décembre 2006 22:45, vous avez écrit :
Quoted 76 lines · On Tue, 19 Dec 2006 22:18:55 +0100 Corentin CHARY wrote:
Quoted 1 line
Remove the deprecated
asus_uidandasus_gidparameters.Hi,
Where are they documented as deprecated?Thanks.
Quoted 68 lines
Signed-off-by Corentin Chary <[email protected]>--- asus_acpi.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-)drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +2
-11@@ -76,13 +76,6 @@ MODULE_DESCRIPTION(ACPI_HOTK_NAME); MODULE_LICENSE("GPL"); -static uid_t asus_uid; -static gid_t asus_gid; -module_param(asus_uid, uint, 0); -MODULE_PARM_DESC(asus_uid, "UID for entries in /proc/acpi/asus.\n"); -module_param(asus_gid, uint, 0); -MODULE_PARM_DESC(asus_gid, "GID for entries in /proc/acpi/asus.\n"); - /* For each model, all features implemented, * those marked with R are relative to HOTK, A for absolute */ struct model_data {@@ -916,8 +909,8 @@ proc->read_proc = readfunc; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE; - proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; return 0; }@@ -926,19 +919,7 @@ struct proc_dir_entry *proc; mode_t mode; - /* - * If parameter uid or gid is not changed, keep the defaultsetting for
- * our proc entries (-rw-rw-rw-) else, it means we care about
security,drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +0
-8- * and then set to -rw-rw---- - */ - - if ((asus_uid == 0) && (asus_gid == 0)) { - mode = S_IFREG | S_IRUGO | S_IWUGO; - } else { - mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; - printk(KERN_WARNING " asus_uid and asus_gid parametersare " - "deprecated, use chown and chmod
instead!\n"); - }drivers/acpi/asus_acpi.c 2006-12-15 10:37:36.000000000 +0100 renamed from drivers/acpi/asus_acpi.c 2006-12-15 10:36:09.000000000 +0100 +3
-2+ mode = S_IFREG | S_IRUGO | S_IWUGO; acpi_device_dir(device) = asus_proc_dir; if (!acpi_device_dir(device))@@ -949,8 +930,8 @@ proc->read_proc = proc_read_info; proc->data = acpi_driver_data(device); proc->owner = THIS_MODULE; - proc->uid = asus_uid; - proc->gid = asus_gid; + proc->uid = 0; + proc->gid = 0; } else { printk(KERN_WARNING " Unable to create " PROC_INFO " fs entry\n");
Quoted 1 line
Quoted 1 line
Quoted 1 line
--
---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Le mardi 19 décembre 2006 23:22, Randy Dunlap a écrit :
Quoted 10 lines · On Tue, 19 Dec 2006 23:18:10 +0100 Corentin CHARY wrote:
Quoted 5 lines
Just look the code ;)
Quoted 3 lines
Quoted 3 lines
- printk(KERN_WARNING "
asus_uidandasus_gid
parameters are " - "deprecated, use chown and
chmod instead!\n"); - }That's really not the right place for it.
SeeDocumentation/feature-removal-schedule.txt.
Yep, you're right, but it should have been added here since January . It's in acpi4asus 0.30, released on 2006-01-17, but I don't know when it had been merged in the kernel. So, maybe we should wait, but I think nobody use that (I know it's not a good reason) ...
Signature · 6 lines
CHARY 'Iksaif' Corentin http://xf.iksaif.net - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html