Remove the functionality added in rev 1.7.
With no menu items the mbr_bootsel code will wait for the timeout (default 10 seconds) and then boot the default device - usually the active partition. Forcing the 'active' partition was wrong - jmmv has a system which needs to boot from hd1 where hd0 has no mbr partition info. I suspect the problem I though rev 1.7 fixed was actually caused by disklabel copying sector zero of the disk to sector zero of the partition! Gains another 9 bytes of free space, mbr_bootsel now has 20 free bytes.
This commit is contained in:
parent
56afb5b885
commit
ab6077db18
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: mbr.S,v 1.9 2004/08/14 21:03:23 dsl Exp $ */
|
/* $NetBSD: mbr.S,v 1.10 2004/09/01 20:31:20 dsl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
|
* Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
|
||||||
@ -215,20 +215,13 @@ next_ptn:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we haven't output any menu entries, then the system sits waiting
|
* The non-bootsel code traverses this code path, it needs the
|
||||||
* for a keypress with the user looking at a blank screen wondering
|
* correct keycode to select the active partition.
|
||||||
* why nothing is happening.
|
|
||||||
* To stop this we generate <ENTER> - to boot the active partition
|
|
||||||
* if we haven't output any menu texts.
|
|
||||||
* The non-bootsel code also traverses this code path.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BOOTSEL
|
#ifndef BOOTSEL
|
||||||
movb $SCAN_ENTER - SCAN_F1, %al
|
mov $SCAN_ENTER - SCAN_F1, %ax
|
||||||
#else
|
#else
|
||||||
movb $SCAN_ENTER, %al /* default to active partition */
|
|
||||||
cmpb $'0', prefix /* did we output a menu ? */
|
|
||||||
je check_key /* Nope - process SCAN_ENTER */
|
|
||||||
/*
|
/*
|
||||||
* Get the initial time value for the timeout comparison. It is returned
|
* Get the initial time value for the timeout comparison. It is returned
|
||||||
* by int 1a in cx:dx. We do sums modulo 2^16 so it doesn't matter if
|
* by int 1a in cx:dx. We do sums modulo 2^16 so it doesn't matter if
|
||||||
@ -252,12 +245,12 @@ wait_key:
|
|||||||
cmpw timeout, %dx /* always wait for 1 tick... */
|
cmpw timeout, %dx /* always wait for 1 tick... */
|
||||||
jbe 3b /* 0xffff means never timeout */
|
jbe 3b /* 0xffff means never timeout */
|
||||||
def_key:
|
def_key:
|
||||||
movb defkey, %al /* timedout - pick default key */
|
mov defkey - 1, %ax /* timedout - get default key to %ah */
|
||||||
jmp check_key
|
jmp 4f
|
||||||
get_key:
|
get_key:
|
||||||
xorb %ah, %ah
|
xorb %ah, %ah
|
||||||
int $0x16 /* 'read key', code ah, ascii al */
|
int $0x16 /* 'read key', code ah, ascii al */
|
||||||
shr $8, %ax /* code in %al, %ah zero */
|
4: shr $8, %ax /* code in %al, %ah zero */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We have a keycode, see what it means.
|
* We have a keycode, see what it means.
|
||||||
|
Loading…
Reference in New Issue
Block a user