Alan Cox <alan@lxorguk.ukuu.org.uk> writes: >> I just wanted something stupid and simple, so the -mm tree would not >> be full of broken sysctls. > > Well I'd like you to not replace one pile of hard to clean up but easy to > locate crap by smearing other hard to fix in one go crap over the kernel. I'm not certain I see the difference. I just replaced the comparison of one label with another. There may have been more beauty in one or the other but it really should not have made a difference maintenance wise. Perhaps I'm just short some cdrom context here to understand your problem. Regardless. Looking at the code I think we can do something straightforward and even more stupid without needing any comparisons. Alan does this look a little better? static int cdrom_sysctl_handler(struct ctl_table *ctl, int write, struct file * filp, void __user *buffer, size_t *lenp, loff_t *ppos) { int *valp = ctl->data; int val = *valp; int ret; ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); if (write) { /* we only care for 1 or 0. */ autoclose = !!cdrom_sysctl_settings.autoclose; autoeject = !!cdrom_sysctl_settings.autoeject; debug = !!cdrom_sysctl_settings.debug; lockdoor = !!cdrom_sysctl_settings.lock; check_media_type = !!cdrom_sysctl_settings.check; /* update the option flags according to the changes. we don't have per device options through sysctl yet, but we will have and then this will disappear. */ cdrom_update_settings(); } return ret; } Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] Remove CTL_UNNUMBERED
- From: Alexey Dobriyan <adobriyan@sw.ru>
- Re: [PATCH] Remove CTL_UNNUMBERED
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [PATCH] Remove CTL_UNNUMBERED
- From: Alexey Dobriyan <adobriyan@sw.ru>
- [PATCH 2/2] sysctl: remove CTL_UNNUMBERED
- From: Alexey Dobriyan <adobriyan@sw.ru>
- [PATCH 1/3] sysctl core: Stop using the unnecessary ctl_table typedef
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 2/3] sysctl: Factor out sysctl_data.
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 3/3] sysctl: Error on bad sysctl tables
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 01/10] sysctl: Update sysctl_check_table
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 02/10] sysct mqueue: Remove the binary sysctl numbers
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 03/10] sysctl: Remove binary sysctl support where it clearly doesn't work.
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 04/10] sysctl: Fix neighbour table sysctls.
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path)
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 07/10] sysctl: x86_64 remove unnecessary binary paths.
- From: ebiederm@xmission.com (Eric W. Biederman)
- [PATCH 08/10] sysctl: Remove broken cdrom binary sysctls
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [PATCH 08/10] sysctl: Remove broken cdrom binary sysctls
- From: Alan Cox <alan@lxorguk.ukuu.org.uk>
- Re: [PATCH 08/10] sysctl: Remove broken cdrom binary sysctls
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [PATCH 08/10] sysctl: Remove broken cdrom binary sysctls
- From: Alan Cox <alan@lxorguk.ukuu.org.uk>
- [PATCH] Remove CTL_UNNUMBERED
- Prev by Date: Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization
- Next by Date: [PATCH 2.6.23-rc2] getrusage: return ru_maxrss
- Previous by thread: Re: [PATCH 08/10] sysctl: Remove broken cdrom binary sysctls
- Next by thread: [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls
- Index(es):
![]() |