lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a0801140503t484ab61clcf41f4e4ea913fe4@mail.gmail.com>
Date:	Mon, 14 Jan 2008 08:03:29 -0500
From:	"Mike Frysinger" <vapier.adi@...il.com>
To:	"Johannes Weiner" <hannes@...urebad.de>
Cc:	"Alan Cox" <alan@...rguk.ukuu.org.uk>,
	"Marc Pignat" <marc.pignat@...s.ch>, wim@...ana.be,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC, PATCH] watchdog on gpio

On Jan 14, 2008 7:49 AM, Johannes Weiner <hannes@...urebad.de> wrote:
> "Mike Frysinger" <vapier.adi@...il.com> writes:
> > wonder if we could design a printk designed for __init functions to
> > address this in a clean fashion.
> > #define init_printk(fmt, __VA_ARGS__) \
> >   do { \
> >     static const __init char __fmt[] = fmt; \
> >     printk(__fmt , ## __VA_ARGS__); \
> >   } while (0)
> >
> > (yes, i know this isnt perfect as you'd need to pass back the return
> > value of printk(), but it's an idea)
>
> How about:
>
> #define init_printk(fmt, args...) ({            \
>         static const __init char __fmt[] = fmt; \
>         printk(__fmt, args);                    \
> })
>
> Now it returns the printk result.

i wasnt really worried about that ... i was worried about other random
things i may have missed

your dropping of ## wont work as you need gcc to expand args and take
away the , in the simple 1 arg case:
init_printk("MOO");
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ