patch-2.1.78 linux/scripts/tkgen.c

Next file: linux/CREDITS
Previous file: linux/scripts/split-include.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.77/linux/scripts/tkgen.c linux/scripts/tkgen.c
@@ -53,6 +53,14 @@
  * 1997 12 08
  * Michael Chastain - Remove sound driver special cases.
  *
+ * 1997 11 15
+ * Michael Chastain - For choice buttons, write values for all options,
+ *                    not just the single chosen one.  This is compatible
+ *                    with 'make config' and 'make oldconfig', and is
+ *                    needed so smart-config dependencies work if the
+ *                    user switches from one configuration method to
+ *                    another.
+ *
  * TO DO:
  *   - clean up - there are useless ifdef's everywhere.
  *   - better comments throughout - C code generating tcl is really cryptic.
@@ -1034,9 +1042,10 @@
 		      cfg1 != NULL && cfg1->tok == tok_choice;
 		      cfg1 = cfg1->next)
 		    {
-		      printf("\tif { $%s == \"%s\" } then { write_tristate $cfg $autocfg %s 1 $notmod }\n",
+		      printf("\tif { $%s == \"%s\" } then { write_tristate $cfg $autocfg %s 1 $notmod } else { write_tristate $cfg $autocfg %s 0 $notmod }\n",
 			     cfg->optionname,
 			     cfg1->label,
+			     cfg1->optionname,
 			     cfg1->optionname);
 		    }
 		}


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov