All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Shan Wei <shanwei88@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.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
Date: Tue, 27 Nov 2012 12:18:26 +0800	[thread overview]
Message-ID: <50B43F12.1090709@asianux.com> (raw)
In-Reply-To: <50B430B5.1080700@gmail.com>

于 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'.

> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


-- 
Chen Gang

Asianux Corporation

  reply	other threads:[~2012-11-27  4:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  2:52 [PATCH] net: ipv6: change %8s to %s for rt->dst.dev->name in seq_printf of rt6_info_route Chen Gang
2012-11-22  5:28 ` Shan Wei
2012-11-22  8:37   ` Chen Gang
2012-11-23  3:35     ` Fwd: " Chen Gang
2012-11-27  3:17       ` Shan Wei
2012-11-27  4:18         ` Chen Gang [this message]
2012-11-27  4:45           ` Chen Gang
2012-11-27  5:40             ` Chen Gang
2012-11-27  5:52               ` Chen Gang
2012-11-28  5:54                 ` Chen Gang
2012-11-27  4:56           ` Shan Wei
2012-11-27  5:35             ` Chen Gang
2012-11-29  1:43             ` [Consult] excuse me: sorry for the negative effects which I made Chen Gang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B43F12.1090709@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=shanwei88@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.