From 210594d64a01f5813540ae3577cd6ead7a9b815b Mon Sep 17 00:00:00 2001 From: tsutsui Date: Tue, 20 Jan 2009 13:35:28 +0000 Subject: [PATCH] Disable LOAD_NOTE on floppy boot. Fixes PR install/38943 on news68k. news68k uses single boot floppy, but this still prevents extra seek across a whole kernel in ustarfs. --- sys/arch/news68k/stand/boot/boot.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arch/news68k/stand/boot/boot.c b/sys/arch/news68k/stand/boot/boot.c index 06f50f73bae7..84f609657758 100644 --- a/sys/arch/news68k/stand/boot/boot.c +++ b/sys/arch/news68k/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.16 2008/07/16 13:19:20 tsutsui Exp $ */ +/* $NetBSD: boot.c,v 1.17 2009/01/20 13:35:28 tsutsui Exp $ */ /*- * Copyright (c) 1999 Izumi Tsutsui. All rights reserved. @@ -83,6 +83,7 @@ boot(uint32_t d4, uint32_t d5, uint32_t d6, uint32_t d7) u_long marks[MARK_MAX]; static char devname[32], file[32]; void (*entry)(void); + int loadflag; printf("%s Secondary Boot, Revision %s (from NetBSD %s)\n", bootprog_name, bootprog_rev, bootprog_kernrev); @@ -122,10 +123,15 @@ boot(uint32_t d4, uint32_t d5, uint32_t d6, uint32_t d7) 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; + 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; }