diff mbox

net: ipv6: change %8s to %s for rt->dst.dev->name in seq_printf of rt6_info_route

Message ID 50972C58.4010008@asianux.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Chen Gang Nov. 5, 2012, 3:02 a.m. UTC
> 
> 1. not to send same patch triple times. 

  thanks, I shall notice, next time.
  (I shall 'believe' another members).

> 2. config your email client,because tab is changed to space.
>    you can read Documentation/email-clients.txt.

  1) thanks. I shall notice, next time.
  2) now, I get gvim as extention editor for thounderbird
  3) the patch is generated by `git format-patch -s --summary --stat`
     it use "' '\t" as head, I do not touch it, maybe it is correct.

welcome any members to giving additional suggestions and completions.

thanks

the modified contents are below,
-----------------------------------------------------------------------------------

  the length of rt->dst.dev->name is 16 (IFNAMSIZ)
  in seq_printf, it is not suitable to use %8s for rt->dst.dev->name.
  so change it to %s, since each line has not been solid any more.

  additional information:

    %8s  limit the width, not for the original string output length
         if name length is more than 8, it still can be fully displayed.
         if name length is less than 8, the ' ' will be filled before name.

    %.8s truly limit the original string output length (precision)

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 net/ipv6/route.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Nov. 5, 2012, 5:50 a.m. UTC | #1
From: Chen Gang <gang.chen@asianux.com>
Date: Mon, 05 Nov 2012 11:02:48 +0800

>> 
>> 1. not to send same patch triple times. 
> 
>   thanks, I shall notice, next time.
>   (I shall 'believe' another members).
> 
>> 2. config your email client,because tab is changed to space.
>>    you can read Documentation/email-clients.txt.
> 
>   1) thanks. I shall notice, next time.
>   2) now, I get gvim as extention editor for thounderbird
>   3) the patch is generated by `git format-patch -s --summary --stat`
>      it use "' '\t" as head, I do not touch it, maybe it is correct.
> 
> welcome any members to giving additional suggestions and completions.
> 
> thanks
> 
> the modified contents are below,

Post new versions of a patch as fresh postings, not as replies
to other emails.
--
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 Nov. 5, 2012, 6:02 a.m. UTC | #2
于 2012年11月05日 13:50, David Miller 写道:
> 
> Post new versions of a patch as fresh postings, not as replies
> to other emails.
> 
> 

  thanks, I shall notice, next time.
  if truly need sending it again (5th time), please tell me, thanks.
  (since, it has been posted "4 times", which has almost been 'spam')
diff mbox

Patch

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c42650c..b60bc52 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2835,7 +2835,7 @@  static int rt6_info_route(struct rt6_info *rt, void *p_arg)
 	} else {
 		seq_puts(m, "00000000000000000000000000000000");
 	}
-	seq_printf(m, " %08x %08x %08x %08x %8s\n",
+	seq_printf(m, " %08x %08x %08x %08x %s\n",
 		   rt->rt6i_metric, atomic_read(&rt->dst.__refcnt),
 		   rt->dst.__use, rt->rt6i_flags,
 		   rt->dst.dev ? rt->dst.dev->name : "");