lkml.org 
[lkml]   [2010]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] kconfig: save location of config symbols
    Date
    When we add a new config symbol save the file/line
    so we later can refer to their location.

    The information is saved as a property to a config symbol
    because we may have multiple definitions of the same symbol.

    This has the side-effect that a symbol always has
    at least one property.

    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Cc: Roman Zippel <zippel@linux-m68k.org>
    ---
    scripts/kconfig/expr.h | 1 +
    scripts/kconfig/menu.c | 2 ++
    scripts/kconfig/symbol.c | 2 ++
    3 files changed, 5 insertions(+), 0 deletions(-)

    diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
    index 75a31e4..6ee2e4f 100644
    --- a/scripts/kconfig/expr.h
    +++ b/scripts/kconfig/expr.h
    @@ -132,6 +132,7 @@ enum prop_type {
    P_SELECT, /* select BAR */
    P_RANGE, /* range 7..100 (for a symbol) */
    P_ENV, /* value from environment variable */
    + P_SYMBOL, /* where a symbol is defined */
    };

    struct property {
    diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
    index 1179989..4fb5902 100644
    --- a/scripts/kconfig/menu.c
    +++ b/scripts/kconfig/menu.c
    @@ -58,6 +58,8 @@ void menu_add_entry(struct symbol *sym)
    *last_entry_ptr = menu;
    last_entry_ptr = &menu->next;
    current_entry = menu;
    + if (sym)
    + menu_add_symbol(P_SYMBOL, sym, NULL);
    }

    void menu_end_entry(void)
    diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
    index c127fa3..9f180ab 100644
    --- a/scripts/kconfig/symbol.c
    +++ b/scripts/kconfig/symbol.c
    @@ -961,6 +961,8 @@ const char *prop_get_type_name(enum prop_type type)
    return "select";
    case P_RANGE:
    return "range";
    + case P_SYMBOL:
    + return "symbol";
    case P_UNKNOWN:
    break;
    }
    --
    1.6.0.6


    \
     
     \ /
      Last update: 2010-07-31 23:35    [W:0.023 / U:31.620 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site