Disable LOAD_NOTE on floppy boot. Fixes PR install/38943 on newsmips.

This commit is contained in:
tsutsui 2009-01-20 13:12:26 +00:00
parent 14d25567b4
commit b5ed1e6cdb
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.16 2005/12/11 12:18:25 christos Exp $ */
/* $NetBSD: boot.c,v 1.17 2009/01/20 13:12:26 tsutsui Exp $ */
/*-
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
@ -73,6 +73,7 @@ boot(uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4,
struct btinfo_bootarg bi_arg;
struct btinfo_bootpath bi_bpath;
struct btinfo_systype bi_sys;
int loadflag;
/* Clear BSS. */
memset(_edata, 0, _end - _edata);
@ -160,12 +161,17 @@ boot(uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4,
kernels[1] = NULL;
}
/* disable LOAD_NOTE on floppy to avoid backward seek across volumes */
loadflag = LOAD_KERNEL;
if (devname[0] == 'f') /* XXX */
loadflag &= ~LOAD_NOTE;
marks[MARK_START] = 0;
for (i = 0; kernels[i]; i++) {
sprintf(file, "%s%s", devname, kernels[i]);
DPRINTF("trying %s...\n", file);
fd = loadfile(file, marks, LOAD_KERNEL);
fd = loadfile(file, marks, loadflag);
if (fd != -1)
break;
}