Module Name:    src
Committed By:   martin
Date:           Tue Oct 21 18:19:17 UTC 2014

Modified Files:
        src/usr.sbin/sysinst: mbr.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/mbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.3 src/usr.sbin/sysinst/mbr.c:1.4
--- src/usr.sbin/sysinst/mbr.c:1.3	Tue Aug 19 06:49:21 2014
+++ src/usr.sbin/sysinst/mbr.c	Tue Oct 21 18:19:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.3 2014/08/19 06:49:21 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.4 2014/10/21 18:19:17 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1459,6 +1459,11 @@ read_mbr(const char *disk, mbr_info_t *m
 	 */
 	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)

Reply via email to