[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50B44563.8060905@asianux.com>
Date: Tue, 27 Nov 2012 12:45:23 +0800
From: Chen Gang <gang.chen@...anux.com>
To: Shan Wei <shanwei88@...il.com>
CC: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: Fwd: Re: [PATCH] net: ipv6: change %8s to %s for rt->dst.dev->name
in seq_printf of rt6_info_route
于 2012年11月27日 12:18, Chen Gang 写道:
> 于 2012年11月27日 11:17, Shan Wei 写道:
>> > Chen Gang said, at 2012/11/23 11:35:
>>> >> 2) about %*s:
>>> >> since kernel is an open system, IFNAMSIZ is belong to OS API level for outside
>>> >> it has effect both on individual kernel modules and user mode system call
>>> >> we need obey this rule, and %8s is not match this rule.
>>> >> so %8s is not suitable. (and now we have to choose %16s or %s).
>> >
>> > Your patch will change the format of /proc/net/ipv6_route.
> Yes, it will be changed.
> although it belongs to "User Experience", it is not belong to os api level.
> for os api level: we must commit them not be changed (they are testament)
> for User Experience: we can change it, but maybe users feel 'not good'.
>
I think (only for my thought, maybe not correct):
for user input through /proc/* are all for os api level, not for "User Experience".
for most of outputs to user through /proc/*, are "User Experience".
>> > Why we need to keep be consistent with user mode?
> it is for "keep source code simple and clear"
> when others see the %8s, easy to make them miss understanding (not quite clear)
> so better to change it to %s.
>
>
>> > However user operates device name, no effect on the showing of /proc/net/ipv6_route.
> now, no effect.
>
>
> all together:
> since we are not user interactive program,
> "keeping source code simple and clear" is more important than "User Experience"
>
>
>> >
>>> >>
>>> >> for the format of information which seq_printf output:
>>> >> it is not belong to OS API level for outside (at least, for current case, it is true).
>>> >> so we need not keep 'compatible' of it, so %16s is not necessary.
>> >
>> > Can you explain If we don't change to %s, what will happen?
>> >
> for outside, nothing will happen.
>
> so it is not for correctness, it is only for "keep source code simple and clear".
>
>>> >>
>>> >> for keeping source code simple and clearly:
>>> >> %s is better than %16s.
>>> >>
>>> >> so for result, we should choose %s only (neither %16s nor %8s).
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe netdev" in
>> > the body of a message to majordomo@...r.kernel.org
>> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>> >
>> >
>
> -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send
> the line "unsubscribe netdev" in the body of a message to
> majordomo@...r.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
--
Chen Gang
Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists