Re: Strange ipfw change (Sparc bugfix?)

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Thu, 10 Sep 1998 01:30:07 +0200 (CEST)


On Wed, 9 Sep 1998, Marc Duponcheel wrote:
> On Tue, Sep 08, 1998 at 06:20:01PM -0700, David S. Miller wrote:
> > From: Paul Rusty Russell <Paul.Russell@rustcorp.com.au>
> > Date: Tue, 08 Sep 1998 05:49:39 -0700
> >
> > I am worried that this `fix' (presumably to fix reported
> > /proc/net/ip_fwchains breakage on sparcs) covers up a real printk()
> > problem with `%hu'.
> >
> > Whoever was responsible, please put my mind at ease.
> > Rusty.
> >
> > No it doesn't cover up any printk() bug, ANSI C says what you were
> > doing there is illegal.
>
> When I was first 'debugging' the 'ipfw sparc bug' I also thought that
> printk() was writing bad the zeroes to /proc/net/ip_fwchains (using
> vsprintf). But, since the patch has fixed ipchains, I guess things are
> all right now.
>
> Sorry my ignorance but what does qualifier 'h' (implemented by
> vsprintf in kernel) actually mean in the printf family?
> the code goes like this:
>
> if (qualifier == 'h') {
> if (flags & SIGN)
> num = va_arg(args, short);
> else
> num = va_arg(args, unsigned short);
> }

man 3 printf

`h' means the following argument is to be considered a short.

Greetings,

Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/faq.html