Module Name:    src
Committed By:   dyoung
Date:           Mon Feb 21 00:43:20 UTC 2011

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

Log Message:
biosdisk_getextinfo() can fail.  If it does fail in set_geometry(),
clear the flag BIOSDISK_INT13EXT so that a caller such as read_gpt()
will not try to rely on the gibberish in the biosdisk_extinfo.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/i386/stand/lib/biosdisk_ll.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_ll.c
diff -u src/sys/arch/i386/stand/lib/biosdisk_ll.c:1.29 src/sys/arch/i386/stand/lib/biosdisk_ll.c:1.30
--- src/sys/arch/i386/stand/lib/biosdisk_ll.c:1.29	Thu Dec 30 22:27:43 2010
+++ src/sys/arch/i386/stand/lib/biosdisk_ll.c	Mon Feb 21 00:43:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk_ll.c,v 1.29 2010/12/30 22:27:43 jakllsch Exp $	 */
+/*	$NetBSD: biosdisk_ll.c,v 1.30 2011/02/21 00:43:19 dyoung Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -128,7 +128,8 @@
 		d->flags |= BIOSDISK_INT13EXT;
 		if (ed != NULL) {
 			ed->size = sizeof(*ed);
-			biosdisk_getextinfo(d->dev, ed);
+			if (biosdisk_getextinfo(d->dev, ed) != 0)
+				d->flags &= ~BIOSDISK_INT13EXT;
 		}
 	}
 

Reply via email to