Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/amiga multiply the missing factor to offset w...



details:   https://anonhg.NetBSD.org/src/rev/469c5c55b956
branches:  trunk
changeset: 822010:469c5c55b956
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Feb 25 22:45:59 2017 +0000

description:
multiply the missing factor to offset when sorting partitions
(harmless for ``normal'' disks although)

diffstat:

 sys/arch/amiga/amiga/disksubr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r a264d838574e -r 469c5c55b956 sys/arch/amiga/amiga/disksubr.c
--- a/sys/arch/amiga/amiga/disksubr.c   Sat Feb 25 22:40:18 2017 +0000
+++ b/sys/arch/amiga/amiga/disksubr.c   Sat Feb 25 22:45:59 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.64 2017/02/25 22:40:18 rin Exp $        */
+/*     $NetBSD: disksubr.c,v 1.65 2017/02/25 22:45:59 rin Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.64 2017/02/25 22:40:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.65 2017/02/25 22:45:59 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -396,7 +396,8 @@
                        daddr_t boff;
 
                        boff = pbp->e.lowcyl * pbp->e.secpertrk
-                           * pbp->e.numheads;
+                           * pbp->e.numheads
+                           * ((pbp->e.sizeblock << 2) / lp->d_secsize);
                        if (boff > (pp - 1)->p_offset)
                                break;
                        *pp = *(pp - 1);        /* struct copy */



Home | Main Index | Thread Index | Old Index