Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Make netbsd32_from_{ifreq, oifreq}() copy...
details: https://anonhg.NetBSD.org/src/rev/d9defcf1fa19
branches: trunk
changeset: 749831:d9defcf1fa19
user: njoly <njoly%NetBSD.org@localhost>
date: Thu Dec 10 14:58:28 2009 +0000
description:
Make netbsd32_from_{ifreq,oifreq}() copy the whole structure, not only
the interface name. Finally fix my own PR/39424.
ok by christos.
diffstat:
sys/compat/netbsd32/netbsd32_ioctl.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r f6c317015b5d -r d9defcf1fa19 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Thu Dec 10 14:13:48 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Thu Dec 10 14:58:28 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.43 2009/12/09 04:50:47 christos Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.44 2009/12/10 14:58:28 njoly Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.43 2009/12/09 04:50:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.44 2009/12/10 14:58:28 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -254,8 +254,7 @@
* union member needs to be converted to 64 bits... this
* is very driver specific and so we ignore it for now..
*/
- (void)memcpy(s32p->ifr_name, p->ifr_name,
- MIN(sizeof(s32p->ifr_name), sizeof(p->ifr_name)));
+ memcpy(s32p, p, sizeof *p);
if (cmd == SIOCGIFDATA || cmd == SIOCZIFDATA)
NETBSD32PTR32(s32p->ifr_data, p->ifr_data);
}
@@ -270,8 +269,7 @@
* union member needs to be converted to 64 bits... this
* is very driver specific and so we ignore it for now..
*/
- (void)memcpy(s32p->ifr_name, p->ifr_name,
- MIN(sizeof(s32p->ifr_name), sizeof(p->ifr_name)));
+ memcpy(s32p, p, sizeof *p);
if (cmd == SIOCGIFDATA || cmd == SIOCZIFDATA)
NETBSD32PTR32(s32p->ifr_data, p->ifr_data);
}
Home |
Main Index |
Thread Index |
Old Index