[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170918025455.GD3161@jagdpanzerIV.localdomain>
Date: Mon, 18 Sep 2017 11:55:07 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Pavel Machek <pavel@....cz>, Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Slaby <jslaby@...e.com>, Andreas Mohr <andi@...as.de>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: printk: what is going on with additional newlines?
On (09/17/17 19:45), Joe Perches wrote:
[..]
> > take a look at ACPI acpi_os_vprintf(). for instance.
>
> I've looked.
I don't get your point.
#define ACPI_MSG_ERROR KERN_ERR "ACPI Error: "
#define ACPI_MSG_EXCEPTION KERN_ERR "ACPI Exception: "
#define ACPI_MSG_WARNING KERN_WARNING "ACPI Warning: "
#define ACPI_MSG_INFO KERN_INFO "ACPI: "
so when we do
acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname);
we end up with
printk("%s", KERN_WARNING "ACPI Warning: %%pathname%%");
note how acpi_os_vprintf() calls printk_get_level() _on_ the
buffer is passes to
printk("%s", buffer)
because KERN_WARNING is part of the buffer, not the fmt.
there are also other examples that do similar things.
> Try git grep KERN_SOH.
what for?
-ss
Powered by blists - more mailing lists