From 980d7c811b0692042df46f437b681c6097628d70 Mon Sep 17 00:00:00 2001 From: itojun Date: Mon, 17 Jun 2002 23:59:01 +0000 Subject: [PATCH] LABELSECTOR is redefined to be 0 on macppc, so it is not usable for MBR disk label offset. use hardcoded "1" for now, i guess we need a new #define in sys/disklabel_mbr.h. fixes ofwboot to boot kernel off from MBR-formatted disk. --- sys/arch/macppc/stand/ofwboot/ofdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/macppc/stand/ofwboot/ofdev.c b/sys/arch/macppc/stand/ofwboot/ofdev.c index 04d3aff5e9f3..f0ab7ad53a63 100644 --- a/sys/arch/macppc/stand/ofwboot/ofdev.c +++ b/sys/arch/macppc/stand/ofwboot/ofdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofdev.c,v 1.9 2002/03/30 07:14:49 tsutsui Exp $ */ +/* $NetBSD: ofdev.c,v 1.10 2002/06/17 23:59:01 itojun Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -230,7 +230,7 @@ search_label(devp, off, buf, lp, off0) #endif ) { poff = get_long(&p->mbrp_start) + off0; - if (strategy(devp, F_READ, poff + LABELSECTOR, + if (strategy(devp, F_READ, poff + 1, DEV_BSIZE, buf, &read) == 0 && read == DEV_BSIZE) { if (!getdisklabel(buf, lp)) {