login
Header Space

 
 

Re: [RFC PATCH net-2.6.26 (Plan A)] [TCP]: Lower stack usage in tcp4_seq_show().

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: YOSHIFUJI Hideaki / ?$B5HF#1QL@ <yoshfuji@...>
Cc: <davem@...>, <netdev@...>
Date: Tuesday, April 15, 2008 - 6:45 am

On Tue, Apr 15, 2008 at 07:24:34PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:


Or you can just do
	int len;
	...
	seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
		" %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %p%n",
		...,
		&len);
	seq_printf("%*s\n", TMPSZ - 1 - len, "");

and be done with that, keeping the output unchanged.  That's exactly what
%n is for - it allows to get the width of output so far, precisely for
such situations.
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH net-2.6.26 (Plan A)] [TCP]: Lower stack usage in ..., YOSHIFUJI Hideaki / , (Tue Apr 15, 6:24 am)
Re: [RFC PATCH net-2.6.26 (Plan A)] [TCP]: Lower stack usage..., Al Viro, (Tue Apr 15, 6:45 am)
speck-geostationary