Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/lib Only use the total number of sectors...



details:   https://anonhg.NetBSD.org/src/rev/e982ef222350
branches:  trunk
changeset: 467756:e982ef222350
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sun Mar 28 19:41:27 1999 +0000

description:
Only use the total number of sectors information field from the EDD if
the bit is set that declares the geometry valid. The spec itself says
that this field isn't covered by the "geometry valid" bit, but at
least one BIOS implements it that way.

diffstat:

 sys/arch/i386/stand/lib/bootinfo_biosgeom.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (23 lines):

diff -r b726c895a846 -r e982ef222350 sys/arch/i386/stand/lib/bootinfo_biosgeom.c
--- a/sys/arch/i386/stand/lib/bootinfo_biosgeom.c       Sun Mar 28 19:39:24 1999 +0000
+++ b/sys/arch/i386/stand/lib/bootinfo_biosgeom.c       Sun Mar 28 19:41:27 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootinfo_biosgeom.c,v 1.6 1999/03/12 01:01:42 fvdl Exp $       */
+/*     $NetBSD: bootinfo_biosgeom.c,v 1.7 1999/03/28 19:41:27 fvdl Exp $       */
 
 /*
  * Copyright (c) 1997
@@ -89,11 +89,9 @@
 
                if (d.flags & BIOSDISK_EXT13) {
                        if (ed.flags & EXT13_GEOM_VALID)
-                               bibg->disk[nvalid].totsec = 
-                                   (u_int64_t)ed.sec * (u_int64_t)ed.head *
-                                   (u_int64_t)ed.cyl;
+                               bibg->disk[nvalid].totsec = ed.totsec;
                        else
-                               bibg->disk[nvalid].totsec = ed.totsec;
+                               bibg->disk[nvalid].totsec = 0;
                        bibg->disk[nvalid].flags |= BI_GEOM_EXTINT13;
                }
                for (j = 0, cksum = 0; j < BIOSDISK_SECSIZE; j++)



Home | Main Index | Thread Index | Old Index