Re: [RFC][PATCH] printk: Add option to append kernel version to the dict
From: Tejun Heo
Date: Tue May 17 2016 - 06:08:47 EST
Hello,
On Tue, May 17, 2016 at 11:24:46AM +0200, Petr Mladek wrote:
> The risk is that someone else might need another information.
> If we do it more generic, we might end up with quite complex code.
It can be pretty simple given that there's no real ordering or
formatting involved.
enum {
ECON_APPEND_RELEASE = 1 << 0,
];
static unsigned int ext_con_append_mask;
static int __init ext_con_append_setup(char *str)
{
while (*str) {
switch (*str) {
case 'r':
ext_con_append_mask |= ECON_APPEND_RELEASE;
break;
default:
pr_warning("Unknown ext ext con append format '%c'\n", *str);
}
str++;
}
return 1;
}
__setup("ext_con_append=", ext_con_append_setup);
And we can expand the list as necessary. I don't think it needs to be
a compile time option either. The code involved is minimal after all.
Thanks.
--
tejun