lkml.org 
[lkml]   [2009]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] mqueue namespace: adapt sysctl
On Tue, Feb 24, 2009 at 02:16:51PM -0800, Andrew Morton wrote:
> On Tue, 24 Feb 2009 16:02:56 -0600
> "Serge E. Hallyn" <serue@us.ibm.com> wrote:
>
> > +#ifdef CONFIG_PROC_SYSCTL
> > +static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp,
> > + void __user *buffer, size_t *lenp, loff_t *ppos)
> > +{
> > + struct ctl_table mq_table;
> > + memcpy(&mq_table, table, sizeof(mq_table));
> > + mq_table.data = get_mq(table);
> > +
> > + return proc_dointvec(&mq_table, write, filp, buffer, lenp, ppos);
> > +}
> > +
> > +static int proc_mq_dointvec_minmax(ctl_table *table, int write,
> > + struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
> > +{
> > + struct ctl_table mq_table;
> > + memcpy(&mq_table, table, sizeof(mq_table));
> > + mq_table.data = get_mq(table);
> > +
> > + return proc_dointvec_minmax(&mq_table, write, filp, buffer,
> > + lenp, ppos);
> > +}
> > +#else
> > +proc_handler *proc_mq_dointvec = NULL;
> > +proc_handler *proc_mq_dointvec_minmax = NULL;
> > +#endif
>
> looks odd. Was this
>
> --- a/ipc/mq_sysctl.c~mqueue-namespace-adapt-sysctl-update-fix
> +++ a/ipc/mq_sysctl.c
> @@ -52,8 +52,8 @@ static int proc_mq_dointvec_minmax(ctl_t
> lenp, ppos);
> }
> #else
> -proc_handler *proc_mq_dointvec = NULL;
> -proc_handler *proc_mq_dointvec_minmax = NULL;
> +#define proc_mq_dointvec NULL
> +#define proc_mq_dointvec_minmax NULL
> #endif

I hope, not.

"#define foo NULL" is the least intrusive thing.


\
 
 \ /
  Last update: 2009-02-24 23:29    [W:0.088 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site