xfs-masters
[Top] [All Lists]

[xfs-masters] Re: [PATCH 14/59] sysctl: C99 convert xfs ctl_tables

To: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Subject: [xfs-masters] Re: [PATCH 14/59] sysctl: C99 convert xfs ctl_tables
From: ebiederm@xxxxxxxxxxxx (Eric W. Biederman)
Date: Tue, 16 Jan 2007 11:37:12 -0700
Cc: akpm@xxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20070116181651.GA5028@martell.zuzino.mipt.ru> (Alexey Dobriyan's message of "Tue, 16 Jan 2007 21:16:51 +0300")
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656301563-git-send-email-ebiederm@xmission.com> <20070116181651.GA5028@martell.zuzino.mipt.ru>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
Alexey Dobriyan <adobriyan@xxxxxxxxx> writes:

> On Tue, Jan 16, 2007 at 09:39:19AM -0700, Eric W. Biederman wrote:
>> --- a/fs/xfs/linux-2.6/xfs_sysctl.c
>> +++ b/fs/xfs/linux-2.6/xfs_sysctl.c
>> @@ -55,95 +55,197 @@ xfs_stats_clear_proc_handler(
>
>> +    {
>> +            .ctl_name       = XFS_RESTRICT_CHOWN,
>> +            .procname       = "restrict_chown",
>> +            .data           = &xfs_params.restrict_chown.val,
>> +            .maxlen         = sizeof(int),
>> +            .mode           = 0644,
>> +            .proc_handler   = &proc_dointvec_minmax,
>> +            .strategy       = &sysctl_intvec,
>
> No need for &. These two are functions.

True.  I was trying to preserve as much as I could of the original
to minimize my changes of messing something up.

>> +            .extra1         = &xfs_params.restrict_chown.min,
>> +            .extra2         = &xfs_params.restrict_chown.max
>                                                               ,
>
> Usually, comma is left even if the field is last and no additions
> expected.

Yep.  Again I the comma wasn't there in the first place, so
I didn't add it.

>> +    {
>> +            .ctl_name       = XFS_PANIC_MASK,
>> +            .procname       = "panic_mask",
>> +            .data           = &xfs_params.panic_mask.val,
>> +            .maxlen         = sizeof(int),
>> +            .mode           = 0644,
>> +            .proc_handler   =  &proc_dointvec_minmax,
>                                 ^
> Space.
>
>> +    {
>> +            .ctl_name       = XFS_INHERIT_NODUMP,
>> +            .procname       = "inherit_nodump",
>> +            .data           = &xfs_params.inherit_nodump.val,
>> +            .maxlen         = sizeof(int),
>> +            .mode           = 0644,
>> +            .proc_handler   = &proc_dointvec_minmax,
>> +            .strategy       = &sysctl_intvec, NULL,
>                                                 ^^^^
> Forgotten NULL.

Good catch thank you.

>> +    {
>> +            .ctl_name       = XFS_INHERIT_NOATIME,
>> +            .procname       = "inherit_noatime",
>> +            .data           = &xfs_params.inherit_noatim.val,
>> +            .maxlen         = sizeof(int),
>> +            .mode           = 0644,
>> +            .proc_handler   = &proc_dointvec_minmax,
>> +            .strategy       = &sysctl_intvec, NULL,
>
> Ditto.
>
>> +    {
>> +            .ctl_name       = XFS_STATS_CLEAR,
>> +            .procname       = "stats_clear",
>> +            .data           = &xfs_params.stats_clear.val,
>> +            .maxlen         = sizeof(int),
>> +            .mode           = 0644,
>> +            .proc_handler   =  &xfs_stats_clear_proc_handler,
>                                 ^
> Space.


Eric


<Prev in Thread] Current Thread [Next in Thread>