Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/stand/ofwboot Fix available length calculatio...



details:   https://anonhg.NetBSD.org/src/rev/3b6dcf1f93fa
branches:  trunk
changeset: 809027:3b6dcf1f93fa
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jun 14 16:20:44 2015 +0000

description:
Fix available length calculation in kvamap_extract when reusing existing
mappings.

diffstat:

 sys/arch/sparc/stand/ofwboot/loadfile_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r ebb8cc93ce53 -r 3b6dcf1f93fa sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
--- a/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c   Sun Jun 14 16:19:31 2015 +0000
+++ b/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c   Sun Jun 14 16:20:44 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: loadfile_machdep.c,v 1.13 2014/04/21 18:10:40 palle Exp $      */
+/*     $NetBSD: loadfile_machdep.c,v 1.14 2015/06/14 16:20:44 martin Exp $     */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -136,13 +136,13 @@
                if (kvamap[i].start == NULL)
                        break;
                if ((kvamap[i].start <= va) && (va < kvamap[i].end)) {
-                       uint64_t va_len = kvamap[i].end - va + kvamap[i].start;
+                       uint64_t va_len = kvamap[i].end - va;
                        len = (va_len < len) ? len - va_len : 0;
                        *new_va = kvamap[i].end;
                }
        }
 
-       return (len);
+       return len;
 }
 
 /*



Home | Main Index | Thread Index | Old Index