Module Name:    src
Committed By:   tsutsui
Date:           Tue Jul  3 15:24:37 UTC 2012

Modified Files:
        src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Apply patch:
 PR/46583: BIOS bootloader problems with partitions that start above 1TB

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/i386/stand/lib/biosdisk.c

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

Modified files:

Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.41 src/sys/arch/i386/stand/lib/biosdisk.c:1.42
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.41	Wed Jun 13 18:34:20 2012
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Tue Jul  3 15:24:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.41 2012/06/13 18:34:20 perseant Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.42 2012/07/03 15:24:37 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -416,7 +416,7 @@ read_minix_subp(struct biosdisk *d, stru
 
 	if (readsects(&d->ll, sector, 1, d->buf, 0)) {
 #ifdef DISK_DEBUG
-		printf("Error reading MFS sector %d\n", sector);
+		printf("Error reading MFS sector %"PRId64"\n", sector);
 #endif
 		return EIO;
 	}
@@ -445,10 +445,11 @@ read_label(struct biosdisk *d)
 	struct disklabel dflt_lbl;
 	struct mbr_partition mbr[MBR_PART_COUNT];
 	struct partition *p;
-	int sector, i;
+	uint32_t sector;
+	int i;
 	int error;
 	int typ;
-	int ext_base, this_ext, next_ext;
+	uint32_t ext_base, this_ext, next_ext;
 #ifdef COMPAT_386BSD_MBRPART
 	int sector_386bsd = -1;
 #endif
@@ -473,7 +474,7 @@ read_label(struct biosdisk *d)
 		next_ext = 0;
 		if (readsects(&d->ll, this_ext, 1, d->buf, 0)) {
 #ifdef DISK_DEBUG
-			printf("error reading MBR sector %d\n", this_ext);
+			printf("error reading MBR sector %u\n", this_ext);
 #endif
 			return EIO;
 		}
@@ -486,7 +487,7 @@ read_label(struct biosdisk *d)
 				continue;
 			sector = this_ext + mbr[i].mbrp_start;
 #ifdef DISK_DEBUG
-			printf("ptn type %d in sector %d\n", typ, sector);
+			printf("ptn type %d in sector %u\n", typ, sector);
 #endif
                         if (typ == MBR_PTYPE_MINIX_14B) {
 				if (!read_minix_subp(d, &dflt_lbl,

Reply via email to