Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Little Patch




#include <hallo.h>



I patched the bootmenu so that i can use "Numeric" Keys instead of the "A
B C ..."

If i understood bootpd right then there can't be more than 8
Menupoints. Don't know for dhcp.

But even if i'm wrong. I don't need that much menupoints. :-))

- Begin -
diff -Nur etherboot-4.6.1-vanilla/src/Config
etherboot-4.6.1-patched/src/Config
--- etherboot-4.6.1-vanilla/src/Config  Tue Apr 25 12:30:57 2000
+++ etherboot-4.6.1-patched/src/Config  Fri May 19 22:43:16 2000
@@ -7,6 +7,7 @@
 #      -DIMAGE_MENU    - Allow to interactively chose between different
 #                        bootimages; read vendortags.html for further
 #                        information.
+#      -DSHOW_NUMERIC  - Display Menupoints as Numbers
 #      -DMOTD          - Display message of the day; read vendortags.html
 #                        for further information.
 #      -DASK_BOOT=n    - Ask "Boot from Network or from Local? " at
startup,
@@ -123,8 +124,8 @@

 # These default settings compile Etherboot with a small number of
options.
 # You may wish to enable more of the features if the size of your ROM
allows.
-CFLAGS32+=     -DMOTD -DIMAGE_MENU
-CFLAGS16+=     -DMOTD -DIMAGE_MENU
+CFLAGS32+=     -DMOTD -DIMAGE_MENU -DSHOW_NUMERIC
+CFLAGS16+=     -DMOTD -DIMAGE_MENU -DSHOW_NUMERIC

 # Limit the delay on packet loss/congestion to a more bearable value. See
 # description above.  If unset, do not limit the delay between resend.
diff -Nur etherboot-4.6.1-vanilla/src/bootmenu.c
etherboot-4.6.1-patched/src/bootmenu.c
--- etherboot-4.6.1-vanilla/src/bootmenu.c      Tue Apr 25 12:29:19 2000
+++ etherboot-4.6.1-patched/src/bootmenu.c      Fri May 19 22:39:00 2000
@@ -190,7 +190,11 @@
        for (i = j = 0; i < RFC1533_VENDOR_NUMOFIMG; i++) {
                if ((e = imagelist[i]) != NULL) {
 #if    defined(ANSIESC) && !defined(CONSOLE_SERIAL)
+#ifdef SHOW_NUMERIC
+                       printf("\033[4C%c) ",'1'+j++);
+#else
                        printf("\033[4C%c) ",'A'+j++);
+#endif
 #else
                        printf("    %c) ",'A'+j++);
 #endif
@@ -268,6 +272,9 @@
                        break;
                } else if ((i >= 'a') && (i < 'a'+m)) {
                        i -= 'a';
+                       break;
+               } else if ((i >= '1') && (i < '1'+m)) {
+                       i -= '1';
                        break;
                }
        }
- End -




Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


===========================================================================
This Mail was sent to netboot mailing list by:
Matthias Schniedermeyer <ms@citd.de>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.