From d79acc377c0c49d85188e255039bc3a07145d53b Mon Sep 17 00:00:00 2001 From: sborrill Date: Wed, 22 Oct 2014 12:28:30 +0000 Subject: [PATCH] Pull up the following revisions(s) (requested by martin in ticket #153): usr.sbin/sysinst/mbr.c: revision 1.4 On architectures that have no BIOS (and so do not set a BIOS geometry) we need to initialize the globals bsec, bcyl and bhead before using them. --- usr.sbin/sysinst/mbr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/sysinst/mbr.c b/usr.sbin/sysinst/mbr.c index acaf82fcd72b..29b3b6cc123d 100644 --- a/usr.sbin/sysinst/mbr.c +++ b/usr.sbin/sysinst/mbr.c @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.2.4.1 2014/08/23 03:44:02 riz Exp $ */ +/* $NetBSD: mbr.c,v 1.2.4.2 2014/10/22 12:28:30 sborrill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1459,6 +1459,11 @@ read_mbr(const char *disk, mbr_info_t *mbri) */ if (bsec == 0) bsec = pm->dlsec; + if (bhead == 0) + bhead = pm->dlhead; + if (bcyl == 0) + bhead = pm->dlcyl; + ptn_0_offset = bsec; /* use 1MB default offset on large disks as fdisk(8) */ if (pm->dlsize > 2048 * 1024 * 128)