Messages in this thread | | | Date | Mon, 18 Sep 2017 11:55:07 +0900 | From | Sergey Senozhatsky <> | 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
| |