summaryrefslogtreecommitdiff
path: root/bootblocks
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2003-09-20 19:44:36 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:48:49 +0200
commit22950ba3df3a0b739786243679d69cd4094e8b20 (patch)
tree942907e918e556d340dcbcb8ffdc0f7d020a275e /bootblocks
parent5613ba3c0749fa494d35c4dc36b57c5b4e6edb55 (diff)
downloaddev86-22950ba3df3a0b739786243679d69cd4094e8b20.tar.gz
Import Dev86src-0.16.13.tar.gzv0.16.13
Diffstat (limited to 'bootblocks')
-rw-r--r--bootblocks/boot_win.c33
-rw-r--r--bootblocks/monitor.c3
2 files changed, 22 insertions, 14 deletions
diff --git a/bootblocks/boot_win.c b/bootblocks/boot_win.c
index 6dafdd8..5ee7180 100644
--- a/bootblocks/boot_win.c
+++ b/bootblocks/boot_win.c
@@ -34,6 +34,7 @@ fatal(str)
main()
{
int i, rv;
+ int floppy_only = 0;
reset_screen();
cprintf("...\n");
@@ -46,20 +47,25 @@ main()
if (rv != 0 || bs_buf[510] != 0x55 || bs_buf[511] != (char)0xAA) {
cprintf("Hard disk not bootable.\n");
- boot_floppy();
+ floppy_only = 1;
}
- for(rv=-1, i=0x1BE; i<0x1FE; i+= 16) {
- if (bs_buf[i] == (char)0x80)
- rv = 0;
- }
+ if (!floppy_only) {
+ for(rv=-1, i=0x1BE; i<0x1FE; i+= 16) {
+ if (bs_buf[i] == (char)0x80)
+ rv = 0;
+ }
- if (rv) {
- cprintf("Hard disk has no active partition.\n");
- boot_floppy();
+ if (rv) {
+ cprintf("Hard disk has no active partition.\n");
+ floppy_only = 1;
+ }
}
- cprintf("Press return to skip hard disk boot: ");
+ if (floppy_only)
+ cprintf("Press return to wipe MBR: ");
+ else
+ cprintf("Press return to skip hard disk boot: ");
__set_es(0x40);
for(i=0; ; i++) {
@@ -67,14 +73,17 @@ main()
while (tv == __deek_es(0x6c))
if (kbhit()) {
getch();
- cprintf(" Skipping HD.\n");
+ cprintf("\n");
goto break_break;
}
if (i%10 == 0) cprintf(".");
if (i>= 18*5) {
- cprintf(" Booting HD.\n");
- boot_hd();
+ cprintf(" Booting.\n");
+ if(floppy_only)
+ boot_floppy();
+ else
+ boot_hd();
}
}
break_break:;
diff --git a/bootblocks/monitor.c b/bootblocks/monitor.c
index d139cf6..8e24cff 100644
--- a/bootblocks/monitor.c
+++ b/bootblocks/monitor.c
@@ -1,5 +1,6 @@
#include "monitor.h"
+#include "version.h"
char command_buf[256];
@@ -143,9 +144,7 @@ void init_prog()
#else
printf(" boot monitor");
#endif
-#ifdef VERSION
printf(", Version %s", VERSION);
-#endif
printf(".\n");
cpu_check();