The binary interface for the cdrom sysctls can't possilby work. So remove the binary sysctls and update the test for finding out which sysctl table entry we are dealy with to use the procname and not the ctl_name (which I am removing).
Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- drivers/cdrom/cdrom.c | 31 +++++++++---------------------- 1 files changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 67ee3d4..f0c6318 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -3468,32 +3468,25 @@ static int cdrom_sysctl_handler(ctl_table *ctl, int write, struct file * filp, else *valp = 0; - switch (ctl->ctl_name) { - case DEV_CDROM_AUTOCLOSE: { + if (strcmp(ctl->procname, "autoclose") == 0) { if (valp == &cdrom_sysctl_settings.autoclose) autoclose = cdrom_sysctl_settings.autoclose; - break; - } - case DEV_CDROM_AUTOEJECT: { + } + else if (strcmp(ctl->procname, "autoeject") == 0) { if (valp == &cdrom_sysctl_settings.autoeject) autoeject = cdrom_sysctl_settings.autoeject; - break; - } - case DEV_CDROM_DEBUG: { + } + else if (strcmp(ctl->procname, "debug") == 0) { if (valp == &cdrom_sysctl_settings.debug) debug = cdrom_sysctl_settings.debug; - break; - } - case DEV_CDROM_LOCK: { + } + else if (strcmp(ctl->procname, "lock") == 0) { if (valp == &cdrom_sysctl_settings.lock) lockdoor = cdrom_sysctl_settings.lock; - break; - } - case DEV_CDROM_CHECK_MEDIA: { + } + else if (strcmp(ctl->procname, "check_media") == 0) { if (valp == &cdrom_sysctl_settings.check) check_media_type = cdrom_sysctl_settings.check; - break; - } } /* update the option flags according to the changes. we don't have per device options through sysctl yet, @@ -3507,7 +3500,6 @@ static int cdrom_sysctl_handler(ctl_table *ctl, int write, struct file * filp, /* Place files in /proc/sys/dev/cdrom */ static ctl_table cdrom_table[] = { { - .ctl_name = DEV_CDROM_INFO, .procname = "info", .data = &cdrom_sysctl_settings.info, .maxlen = CDROM_STR_SIZE, @@ -3515,7 +3507,6 @@ static ctl_table cdrom_table[] = { .proc_handler = &cdrom_sysctl_info, }, { - .ctl_name = DEV_CDROM_AUTOCLOSE, .procname = "autoclose", .data = &cdrom_sysctl_settings.autoclose, .maxlen = sizeof(int), @@ -3523,7 +3514,6 @@ static ctl_table cdrom_table[] = { .proc_handler = &cdrom_sysctl_handler, }, { - .ctl_name = DEV_CDROM_AUTOEJECT, .procname = "autoeject", .data = &cdrom_sysctl_settings.autoeject, .maxlen = sizeof(int), @@ -3531,7 +3521,6 @@ static ctl_table cdrom_table[] = { .proc_handler = &cdrom_sysctl_handler, }, { - .ctl_name = DEV_CDROM_DEBUG, .procname = "debug", .data = &cdrom_sysctl_settings.debug, .maxlen = sizeof(int), @@ -3539,7 +3528,6 @@ static ctl_table cdrom_table[] = { .proc_handler = &cdrom_sysctl_handler, }, { - .ctl_name = DEV_CDROM_LOCK, .procname = "lock", .data = &cdrom_sysctl_settings.lock, .maxlen = sizeof(int), @@ -3547,7 +3535,6 @@ static ctl_table cdrom_table[] = { .proc_handler = &cdrom_sysctl_handler, }, { - .ctl_name = DEV_CDROM_CHECK_MEDIA, .procname = "check_media", .data = &cdrom_sysctl_settings.check, .maxlen = sizeof(int), -- 1.5.1.1.181.g2de0 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/