Source-Changes-HG archive

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

[src/netbsd-2]: src/sbin/fdisk Pull up following revision(s) (requested by ts...



details:   https://anonhg.NetBSD.org/src/rev/c76e75fbbc82
branches:  netbsd-2
changeset: 564348:c76e75fbbc82
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Dec 01 19:55:25 2005 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #10165):
        sbin/fdisk/fdisk.c: revision 1.82 via patch
Fix intuit_translated_geometry() calculation.
>From Izumi Tsutsui in PR bin/26917

diffstat:

 sbin/fdisk/fdisk.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 95f077d699a9 -r c76e75fbbc82 sbin/fdisk/fdisk.c
--- a/sbin/fdisk/fdisk.c        Thu Dec 01 19:46:42 2005 +0000
+++ b/sbin/fdisk/fdisk.c        Thu Dec 01 19:55:25 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdisk.c,v 1.77.2.1 2004/08/16 17:46:13 jmc Exp $ */
+/*     $NetBSD: fdisk.c,v 1.77.2.1.2.1 2005/12/01 19:55:25 riz Exp $ */
 
 /*
  * Mach Operating System
@@ -35,7 +35,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: fdisk.c,v 1.77.2.1 2004/08/16 17:46:13 jmc Exp $");
+__RCSID("$NetBSD: fdisk.c,v 1.77.2.1.2.1 2005/12/01 19:55:25 riz Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1380,10 +1380,10 @@
        for (i = 0; i < MBR_PART_COUNT * 2 - 1; i++) {
                if (get_mapping(i, &c1, &h1, &s1, &a1) < 0)
                        continue;
+               a1 -= s1;
                for (j = i + 1; j < MBR_PART_COUNT * 2; j++) {
                        if (get_mapping(j, &c2, &h2, &s2, &a2) < 0)
                                continue;
-                       a1 -= s1;
                        a2 -= s2;
                        num = (uint64_t)h1 * a2 - (uint64_t)h2 * a1;
                        denom = (uint64_t)c2 * a1 - (uint64_t)c1 * a2;



Home | Main Index | Thread Index | Old Index