Re: dual line backtraces for i386.

From: Chuck Ebbert
Date: Thu Jan 05 2006 - 13:20:41 EST


In-Reply-To: <20060105062208.GA12095@xxxxxxxxxx>

On Thu, 5 Jan 2006 at 01:22:08 -0500, Dave Jones wrote:

> --- linux-2.6.15/arch/i386/kernel/traps.c~ 2005-12-01 04:25:36.000000000 -0500
> +++ linux-2.6.15/arch/i386/kernel/traps.c 2005-12-01 04:36:19.000000000 -0500
> @@ -116,6 +116,7 @@ static inline unsigned long print_contex
> unsigned long *stack, unsigned long ebp)
> {
> unsigned long addr;
> + char space=0;

char space = 0;


> - printk("\n");
> + if (space == 0) {
> + printk(" ");
> + space = 1;
> + } else {
> + printk("\n");
> + space = 0;
> + }

Why not:

printk(space == 0 ? " " : "\n");
space = !space;


> + if (space==1)
> + printk("\n");

if (space == 1)

--
Chuck
Currently reading: _Thud!_ by Terry Pratchett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/