Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst Fixed alignment of call by reference a...



details:   https://anonhg.NetBSD.org/src/rev/d143b6a9f85d
branches:  trunk
changeset: 552183:d143b6a9f85d
user:      takemura <takemura%NetBSD.org@localhost>
date:      Sun Sep 21 02:30:18 2003 +0000

description:
Fixed alignment of call by reference arguments. This change solves unalignement
access and segmentation fault problem on MIPS architecture.

diffstat:

 distrib/utils/sysinst/mbr.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 91dfbeff55d6 -r d143b6a9f85d distrib/utils/sysinst/mbr.c
--- a/distrib/utils/sysinst/mbr.c       Sun Sep 21 02:23:55 2003 +0000
+++ b/distrib/utils/sysinst/mbr.c       Sun Sep 21 02:30:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr.c,v 1.51 2003/08/10 14:51:49 dsl Exp $ */
+/*     $NetBSD: mbr.c,v 1.52 2003/09/21 02:30:18 takemura Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -237,7 +237,7 @@
        char *cp;
        int opt = mbri->opt;
        int type;
-       int sz;
+       int start, sz;
        int i;
        char numbuf[4];
 
@@ -323,10 +323,11 @@
                if (mbri->sector != 0)
                        /* shouldn't be possible to have null start... */
                        return 0;
-               if (find_mbr_space(&mbri->mbr, &mbrp->mbrp_start,
-                                  &mbrp->mbrp_size, bsec, -1) != 0)
+               if (find_mbr_space(&mbri->mbr, &start, &sz, bsec, -1) != 0)
                        /* no space */
                        return 0;
+               mbrp->mbrp_start = start;
+               mbrp->mbrp_size = sz;
                /* If there isn't an active partition mark this one active */
                if (!MBR_IS_EXTENDED(type)) {
                        for (i = 0; i < NMBRPART; i++)



Home | Main Index | Thread Index | Old Index