From d42bc82b0f53e9a0bae0e57522410f32f567da81 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Wed, 23 Dec 2015 15:22:49 +0000 Subject: Ooops. Wrong version of the diff committed, with reversed check for MBR/GPT. Problem found the hard way by Glenn Faustino on tech@ --- sys/arch/amd64/stand/libsa/softraid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/amd64/stand') diff --git a/sys/arch/amd64/stand/libsa/softraid.c b/sys/arch/amd64/stand/libsa/softraid.c index d9807c543db..580daa05060 100644 --- a/sys/arch/amd64/stand/libsa/softraid.c +++ b/sys/arch/amd64/stand/libsa/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.16 2015/12/22 21:15:43 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.17 2015/12/23 15:22:48 krw Exp $ */ /* * Copyright (c) 2012 Joel Sing @@ -522,7 +522,7 @@ sr_getdisklabel(struct sr_boot_volume *bv, struct disklabel *label) /* Check for MBR to determine partition offset. */ bzero(&mbr, sizeof(mbr)); sr_strategy(bv, F_READ, DOSBBSECTOR, sizeof(mbr), &mbr, NULL); - if (gpt_chk_mbr(mbr.dmbr_parts, label)) { + if (gpt_chk_mbr(mbr.dmbr_parts, label) == 0) { start = findopenbsd_gpt(bv); } else if (mbr.dmbr_sign == DOSMBR_SIGNATURE) { -- cgit v1.2.3