kconfig: help includes dependency information

From: Sam Ravnborg (sam_at_ravnborg.org)
Date: 12/31/04

  • Next message: Jesper Juhl: "Re: Compile error in 2.6.10-bk3 in floppy.c"
    Date:	Fri, 31 Dec 2004 00:53:09 +0100
    To: Roman Zippel <zippel@linux-m68k.org>, linux-kernel@vger.kernel.org
    
    

    # This is a BitKeeper generated diff -Nru style patch.
    #
    # ChangeSet
    # 2004/12/31 00:43:45+01:00 sam@mars.ravnborg.org
    # kconfig: help includes dependency information
    #
    # When selecting help on a menu item display
    # "depends on:"
    # "selects:"
    # "selected by:"
    #
    # Only relevant headlines are displayed - so if no "selects:" appear then this menu
    # does not select a specific symbol.
    # Loosly based on a patch by: Cal Peake <cp@absolutedigital.net>
    #
    # Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    #
    # scripts/kconfig/mconf.c
    # 2004/12/31 00:43:27+01:00 sam@mars.ravnborg.org +5 -5
    # display
    # "depends on:"
    # "selects:"
    # "selected by:"
    #
    # information when selecting help on a menu
    #
    diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
    --- a/scripts/kconfig/mconf.c 2004-12-31 00:46:29 +01:00
    +++ b/scripts/kconfig/mconf.c 2004-12-31 00:46:29 +01:00
    @@ -732,17 +732,17 @@
     static void show_help(struct menu *menu)
     {
             const char *help;
    - char *helptext;
             struct symbol *sym = menu->sym;
     
             help = sym->help;
             if (!help)
                     help = nohelp_text;
             if (sym->name) {
    - helptext = malloc(strlen(sym->name) + strlen(help) + 16);
    - sprintf(helptext, "CONFIG_%s:\n\n%s", sym->name, help);
    - show_helptext(menu_get_prompt(menu), helptext);
    - free(helptext);
    + struct gstr str = str_init();
    + str_printf(&str, "CONFIG_%s:\n\n%s", sym->name, help);
    + show_expr(menu, &str);
    + show_helptext(menu_get_prompt(menu), str_get(&str));
    + str_del(&str);
             } else
                     show_helptext(menu_get_prompt(menu), help);
     }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Jesper Juhl: "Re: Compile error in 2.6.10-bk3 in floppy.c"