lkml.org 
[lkml]   [2016]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH] printk: Add option to append kernel version to the dict
    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

    \
     
     \ /
      Last update: 2016-05-17 12:41    [W:2.698 / U:0.916 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site