]> Git Repo - linux.git/commitdiff
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <[email protected]>
Wed, 10 Jul 2013 23:06:46 +0000 (16:06 -0700)
committerLinus Torvalds <[email protected]>
Wed, 10 Jul 2013 23:06:46 +0000 (16:06 -0700)
Pull kconfig updates from Michal Marek:
 - dependency solver fix for make defconfig
 - randconfig fixes, one of which had to be reverted again
 - more user-friendly sorting of search results
 - hex and range keywords support longs
 - fix for [mn]conf not to rely on particular behavior of the LINES and
   COLS variables
 - cleanup of magic constants in kconfig/lxdialog
 - [mn]conf formatting fixes
 - fix for scripts/config's help text in out-of-tree usage (under a
   different name)

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: allow "hex" and "range" to support longs
  Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"
  kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
  kconfig: loop as long as we changed some symbols in randconfig
  kconfig/[mn]conf: make it explicit in the search box that a regexp is possible
  kconfig: sort found symbols by relevance
  kconfig/conf: print the seed used to initialise the RNG for randconfig
  kconfig/conf: accept a base-16 seed for randconfig
  kconfig/conf: fix randconfig setting multiple symbols in a choice
  scripts/config: replace hard-coded script name by a dynamic value
  mconf/nconf: mark empty menus/menuconfigs different from non-empty ones
  nconf: use function calls instead of ncurses' variables LINES and COLS
  mconf: use function calls instead of ncurses' variables LINES and COLS
  kconfig/lxdialog: handle newline characters in print_autowrap()
  kconfig/lxdialog: Use new mininimum resize definitions in conf_choice()
  kconfig/lxdialog: Add definitions for mininimum (re)size values
  kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on

1  2 
Documentation/kbuild/kconfig.txt
scripts/config
scripts/kconfig/lxdialog/menubox.c
scripts/kconfig/mconf.c
scripts/kconfig/menu.c

index 213859e69e88096fc9c45e60d6ddebd92f512e31,e9f9e767f82af2003d3e432d941c9ec525564535..e349f293cc9829dc5cad185a41f95cb8627e90ea
@@@ -165,7 -165,7 +165,7 @@@ Searching in menuconfig
        Example:
                /hotplug
                This lists all config symbols that contain "hotplug",
 -              e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG.
 +              e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
  
        For search help, enter / followed TAB-TAB-TAB (to highlight
        <Help>) and Enter.  This will tell you that you can also use
  
                /^hotplug
  
+       When searching, symbols are sorted thus:
+         - exact match first: an exact match is when the search matches
+           the complete symbol name;
+         - alphabetical order: when two symbols do not match exactly,
+           they are sorted in alphabetical order (in the user's current
+           locale).
+       For example: ^ATH.K matches:
+           ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG
+           [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...]
+       of which only ATH5K and ATH9K match exactly and so are sorted
+       first (and in alphabetical order), then come all other symbols,
+       sorted in alphabetical order.
  ______________________________________________________________________
  User interface options for 'menuconfig'
  
diff --combined scripts/config
index a65ecbbdd32a90fbadf50aa9622ce555294cf350,6b3272ef6ec77d1b8e9d490bbda5e74467651f6d..567120a87c39c0152643fba45f5487979b305afc
@@@ -1,6 -1,8 +1,8 @@@
  #!/bin/bash
  # Manipulate options in a .config file from the command line
  
+ myname=${0##*/}
  # If no prefix forced, use the default CONFIG_
  CONFIG_="${CONFIG_-CONFIG_}"
  
@@@ -8,7 -10,7 +10,7 @@@ usage() 
        cat >&2 <<EOL
  Manipulate options in a .config file from the command line.
  Usage:
config options command ...
$myname options command ...
  commands:
        --enable|-e option   Enable option
        --disable|-d option  Disable option
@@@ -33,14 -35,14 +35,14 @@@ options
        --file config-file   .config file to change (default .config)
        --keep-case|-k       Keep next symbols' case (dont' upper-case it)
  
config doesn't check the validity of the .config file. This is done at next
$myname doesn't check the validity of the .config file. This is done at next
  make time.
  
- By default, config will upper-case the given symbol. Use --keep-case to keep
+ By default, $myname will upper-case the given symbol. Use --keep-case to keep
  the case of all following symbols unchanged.
  
config uses 'CONFIG_' as the default symbol prefix. Set the environment
- variable CONFIG_ to the prefix to use. Eg.: CONFIG_="FOO_" config ...
$myname uses 'CONFIG_' as the default symbol prefix. Set the environment
+ variable CONFIG_ to the prefix to use. Eg.: CONFIG_="FOO_" $myname ...
  EOL
        exit 1
  }
@@@ -105,7 -107,7 +107,7 @@@ while [ "$1" != "" ] ; d
                ;;
        --refresh)
                ;;
 -      --*-after)
 +      --*-after|-E|-D|-M)
                checkarg "$1"
                A=$ARG
                checkarg "$2"
index 38cd69c5660e5163bfc402617de0d702e3372bd6,92b89a6cb35addb31e1330b67787ecfe248bbbc6..c93de0b2faca28525588bceb023f99bdd8a14acf
@@@ -193,7 -193,7 +193,7 @@@ int dialog_menu(const char *title, cons
  do_resize:
        height = getmaxy(stdscr);
        width = getmaxx(stdscr);
-       if (height < 15 || width < 65)
+       if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN)
                return -ERRDISPLAYTOOSMALL;
  
        height -= 4;
        max_choice = MIN(menu_height, item_count());
  
        /* center dialog box on screen */
-       x = (COLS - width) / 2;
-       y = (LINES - height) / 2;
+       x = (getmaxx(stdscr) - width) / 2;
+       y = (getmaxy(stdscr) - height) / 2;
  
        draw_shadow(stdscr, y, x, height, width);
  
                                }
                }
  
 -              if (i < max_choice ||
 -                  key == KEY_UP || key == KEY_DOWN ||
 -                  key == '-' || key == '+' ||
 -                  key == KEY_PPAGE || key == KEY_NPAGE) {
 +              if (item_count() != 0 &&
 +                  (i < max_choice ||
 +                   key == KEY_UP || key == KEY_DOWN ||
 +                   key == '-' || key == '+' ||
 +                   key == KEY_PPAGE || key == KEY_NPAGE)) {
                        /* Remove highligt of current item */
                        print_item(scroll + choice, choice, FALSE);
  
diff --combined scripts/kconfig/mconf.c
index a69cbd78fb38e62f3f6c3978ef6a3935551aaabc,18d3dc93d71883be42be769d516b27485465c969..6c9c45f9fbbac432a877112f4243f483ed01e9e3
@@@ -48,7 -48,7 +48,7 @@@ static const char mconf_readme[] = N_
  "----------\n"
  "o  Use the Up/Down arrow keys (cursor keys) to highlight the item\n"
  "   you wish to change or submenu wish to select and press <Enter>.\n"
- "   Submenus are designated by \"--->\".\n"
+ "   Submenus are designated by \"--->\", empty ones by \"----\".\n"
  "\n"
  "   Shortcut: Press the option's highlighted letter (hotkey).\n"
  "             Pressing a hotkey more than once will sequence\n"
  "\n"),
  menu_instructions[] = N_(
        "Arrow keys navigate the menu.  "
-       "<Enter> selects submenus --->.  "
+       "<Enter> selects submenus ---> (or empty submenus ----).  "
        "Highlighted letters are hotkeys.  "
        "Pressing <Y> includes, <N> excludes, <M> modularizes features.  "
        "Press <Esc><Esc> to exit, <?> for Help, </> for Search.  "
@@@ -401,7 -401,7 +401,7 @@@ static void search_conf(void
        struct subtitle_part stpart;
  
        title = str_new();
-       str_printf( &title, _("Enter %s (sub)string to search for "
+       str_printf( &title, _("Enter %s (sub)string or regexp to search for "
                              "(with or without \"%s\")"), CONFIG_, CONFIG_);
  
  again:
@@@ -498,8 -498,9 +498,9 @@@ static void build_conf(struct menu *men
                                                  menu->data ? "-->" : "++>",
                                                  indent + 1, ' ', prompt);
                                } else
-                                       item_make("   %*c%s  --->", indent + 1, ' ', prompt);
+                                       item_make("   %*c%s  %s",
+                                                 indent + 1, ' ', prompt,
+                                                 menu_is_empty(menu) ? "----" : "--->");
                                item_set_tag('m');
                                item_set_data(menu);
                                if (single_menu_mode && menu->data)
                          (sym_has_value(sym) || !sym_is_changable(sym)) ?
                          "" : _(" (NEW)"));
                if (menu->prompt->type == P_MENU) {
-                       item_add_str("  --->");
+                       item_add_str("  %s", menu_is_empty(menu) ? "----" : "--->");
                        return;
                }
        }
@@@ -670,12 -671,11 +671,12 @@@ static void conf(struct menu *menu, str
                                  active_menu, &s_scroll);
                if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
                        break;
 -              if (!item_activate_selected())
 -                      continue;
 -              if (!item_tag())
 -                      continue;
 -
 +              if (item_count() != 0) {
 +                      if (!item_activate_selected())
 +                              continue;
 +                      if (!item_tag())
 +                              continue;
 +              }
                submenu = item_data();
                active_menu = item_data();
                if (submenu)
@@@ -826,7 -826,9 +827,9 @@@ static void conf_choice(struct menu *me
                dialog_clear();
                res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"),
                                        _(radiolist_instructions),
-                                        15, 70, 6);
+                                       MENUBOX_HEIGTH_MIN,
+                                       MENUBOX_WIDTH_MIN,
+                                       CHECKLIST_HEIGTH_MIN);
                selected = item_activate_selected();
                switch (res) {
                case 0:
@@@ -957,8 -959,8 +960,8 @@@ static int handle_exit(void
        dialog_clear();
        if (conf_get_changed())
                res = dialog_yesno(NULL,
-                                  _("Do you wish to save your new configuration ?\n"
-                                    "<ESC><ESC> to continue."),
+                                  _("Do you wish to save your new configuration?\n"
+                                    "(Press <ESC><ESC> to continue kernel configuration.)"),
                                   6, 60);
        else
                res = -1;
diff --combined scripts/kconfig/menu.c
index fd3f0180e08fbafb537e128c9e46641288c68774,6d11c8f63eb02b17386266aa10b09a3c495204b3..7e233a6ca64ef7faf1bc9390ec89cb90ccef2d98
@@@ -146,24 -146,11 +146,24 @@@ struct property *menu_add_prop(enum pro
                        struct menu *menu = current_entry;
  
                        while ((menu = menu->parent) != NULL) {
 +                              struct expr *dup_expr;
 +
                                if (!menu->visibility)
                                        continue;
 +                              /*
 +                               * Do not add a reference to the
 +                               * menu's visibility expression but
 +                               * use a copy of it.  Otherwise the
 +                               * expression reduction functions
 +                               * will modify expressions that have
 +                               * multiple references which can
 +                               * cause unwanted side effects.
 +                               */
 +                              dup_expr = expr_copy(menu->visibility);
 +
                                prop->visible.expr
                                        = expr_alloc_and(prop->visible.expr,
 -                                                       menu->visibility);
 +                                                       dup_expr);
                        }
                }
  
@@@ -443,6 -430,22 +443,22 @@@ bool menu_has_prompt(struct menu *menu
        return true;
  }
  
+ /*
+  * Determine if a menu is empty.
+  * A menu is considered empty if it contains no or only
+  * invisible entries.
+  */
+ bool menu_is_empty(struct menu *menu)
+ {
+       struct menu *child;
+       for (child = menu->list; child; child = child->next) {
+               if (menu_is_visible(child))
+                       return(false);
+       }
+       return(true);
+ }
  bool menu_is_visible(struct menu *menu)
  {
        struct menu *child;
This page took 0.091147 seconds and 4 git commands to generate.