[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200207223923.b700e363c57f4a6031176205@kernel.org>
Date: Fri, 7 Feb 2020 22:39:23 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [for-next][PATCH 06/26] tools: bootconfig: Add bootconfig
command
On Sat, 08 Feb 2020 00:02:04 +1100
Michael Ellerman <mpe@...erman.id.au> wrote:
> Steven Rostedt <rostedt@...dmis.org> writes:
> > From: Masami Hiramatsu <mhiramat@...nel.org>
> >
> > Add "bootconfig" command which operates the bootconfig
> > config-data on initrd image.
> >
> > User can add/delete/verify the boot config on initrd
> > image using this command.
> >
> > e.g.
> > Add a boot config to initrd image
> > # bootconfig -a myboot.conf /boot/initrd.img
> >
> > Remove it.
> > # bootconfig -d /boot/initrd.img
> >
> > Or verify (and show) it.
> > # bootconfig /boot/initrd.img
> >
> > Link: http://lkml.kernel.org/r/157867223582.17873.14342161849213219982.stgit@devnote2
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > [ Removed extra blank line at end of bootconfig.c ]
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> > ---
> > MAINTAINERS | 1 +
> > tools/Makefile | 11 +-
> > tools/bootconfig/.gitignore | 1 +
> > tools/bootconfig/Makefile | 20 ++
> > tools/bootconfig/include/linux/bootconfig.h | 7 +
> > tools/bootconfig/include/linux/bug.h | 12 +
> > tools/bootconfig/include/linux/ctype.h | 7 +
> > tools/bootconfig/include/linux/errno.h | 7 +
> > tools/bootconfig/include/linux/kernel.h | 18 +
> > tools/bootconfig/include/linux/printk.h | 17 +
> > tools/bootconfig/include/linux/string.h | 32 ++
> > tools/bootconfig/main.c | 353 ++++++++++++++++++++
>
> This doesn't seem to build:
>
> $ cd tools/bootconfig
> $ make
> cc ../../lib/bootconfig.c main.c -Wall -g -I./include -o bootconfig
> In file included from ./include/linux/kernel.h:8,
> from ../../lib/bootconfig.c:12:
> ../../lib/bootconfig.c: In function ‘xbc_init’:
> ./include/linux/printk.h:10:38: error: expected expression before ‘)’ token
> 10 | (pr_output ? printf(fmt, __VA_ARGS__) : 0)
> | ^
> ./include/linux/printk.h:12:16: note: in expansion of macro ‘printk’
> 12 | #define pr_err printk
> | ^~~~~~
> ../../lib/bootconfig.c:740:3: note: in expansion of macro ‘pr_err’
> 740 | pr_err("Error: bootconfig is already initialized.\n");
> | ^~~~~~
> make: *** [Makefile:14: bootconfig] Error 1
>
>
> That's on Fedora 30, x86_64, but I see the same elsewhere.
Oops, thanks for reporting!
I found that the above macro doesn't work if the function gets 1 argument.
It should use ##__VA_ARGS__ instead of __VA_ARGS__.
OK, I'll fix it.
Thanks!
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists