From afd05205dc1e16a6f96b99af1bfde008a1bb7ab9 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 16 Aug 2009 12:21:44 -0400 Subject: [PATCH] Enhance boot menu to allow selection of floppy to boot from. The bootmenu can now reorder the first floppy drive. Note - only the drive mapping is changed - floppy variables in the BDA are still set depending on the real floppy index. --- src/boot.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/boot.c b/src/boot.c index e2d82a8..43ccae5 100644 --- a/src/boot.c +++ b/src/boot.c @@ -138,9 +138,11 @@ menu_show_default(struct ipl_entry_s *ie, int menupos) static int menu_show_floppy(struct ipl_entry_s *ie, int menupos) { - if (!Drives.floppycount) - return 0; - return menu_show_default(ie, menupos); + int i; + for (i = 0; i < Drives.floppycount; i++) { + printf("%d. floppy %d\n", menupos + i, i+1); + } + return Drives.floppycount; } // Show menu items from BCV list. @@ -290,8 +292,14 @@ boot_prep() // Allow user to modify BCV/IPL order. interactive_bootmenu(); + // Setup floppy boot order + int override = IPL.bev[0].subchoice; + int tmp = Drives.idmap[EXTTYPE_FLOPPY][0]; + Drives.idmap[EXTTYPE_FLOPPY][0] = Drives.idmap[EXTTYPE_FLOPPY][override]; + Drives.idmap[EXTTYPE_FLOPPY][override] = tmp; + // Run BCVs - int override = IPL.bev[1].subchoice; + override = IPL.bev[1].subchoice; if (override < IPL.bcvcount) run_bcv(&IPL.bcv[override]); int i; -- 2.39.5