aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-08 09:13:11 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-08 09:13:11 -0800
commit48d026fb89dee478f8e3a580b5298594331cc890 (patch)
tree41252a05752941aa68cb3fd7a1e2de17a7c98b3c
parent1a3d65ddc2b1ac48d798ae9a01de590678959175 (diff)
downloadsyslinux.git-48d026fb89dee478f8e3a580b5298594331cc890.tar.gz
syslinux.git-48d026fb89dee478f8e3a580b5298594331cc890.tar.xz
syslinux.git-48d026fb89dee478f8e3a580b5298594331cc890.zip
memdisk: make "nopass" type-specific, add "nopassany"
Make "nopass" specific to the current drive type. Add new option "nopassany", which also clobbers the drive counts of both types. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--memdisk/setup.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index b8eadfb7..bcb5d040 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -1119,12 +1119,18 @@ void setup(const struct real_mode_args *rm_args_ptr)
ranges[--nranges].type = -1;
}
- if (getcmditem("nopass") != CMD_NOTFOUND) {
- /* nopass specified - we're the only drive by definition */
- printf("nopass specified - we're the only drive\n");
+ if (getcmditem("nopassany") != CMD_NOTFOUND) {
+ printf("nopassany specified - we're the only drive of any kind\n");
bios_drives = 0;
pptr->drivecnt = 0;
+ no_bpt = 1;
pptr->oldint13 = driverptr + hptr->iret_offs;
+ wrz_8(BIOS_EQUIP, rdz_8(BIOS_EQUIP) & ~0xc1);
+ wrz_8(BIOS_HD_COUNT, 0);
+ } else if (getcmditem("nopass") != CMD_NOTFOUND) {
+ printf("nopass specified - we're the only drive\n");
+ bios_drives = 0;
+ pptr->drivecnt = 0;
no_bpt = 1;
} else {
/* Query drive parameters of this type */
@@ -1227,7 +1233,8 @@ void setup(const struct real_mode_args *rm_args_ptr)
if (nhd > 128)
nhd = 128;
- if (!do_eltorito) wrz_8(BIOS_HD_COUNT, nhd);
+ if (!do_eltorito)
+ wrz_8(BIOS_HD_COUNT, nhd);
} else {
/* Update BIOS floppy disk count */
uint8_t equip = rdz_8(BIOS_EQUIP);