Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 don't copy the first netbsd32_export_arg...
details: https://anonhg.NetBSD.org/src/rev/c6657d3cc1ff
branches: trunk
changeset: 339722:c6657d3cc1ff
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Aug 05 23:17:06 2015 +0000
description:
don't copy the first netbsd32_export_args nexports times, but actually
advance the userland pointer each entry through the loop. oops.
diffstat:
sys/compat/netbsd32/netbsd32_nfssvc.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diffs (53 lines):
diff -r 47572f45d8d4 -r c6657d3cc1ff sys/compat/netbsd32/netbsd32_nfssvc.c
--- a/sys/compat/netbsd32/netbsd32_nfssvc.c Wed Aug 05 16:51:09 2015 +0000
+++ b/sys/compat/netbsd32/netbsd32_nfssvc.c Wed Aug 05 23:17:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_nfssvc.c,v 1.2 2015/06/23 06:28:29 dholland Exp $ */
+/* $NetBSD: netbsd32_nfssvc.c,v 1.3 2015/08/05 23:17:06 mrg Exp $ */
/*
* Copyright (c) 2015 Matthew R. Green
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.2 2015/06/23 06:28:29 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.3 2015/08/05 23:17:06 mrg Exp $");
#if defined(_KERNEL_OPT)
#include "opt_nfs.h"
@@ -138,22 +138,24 @@
static int
nfssvc32_exp_in(struct export_args *exp, const void *argp, size_t nexports)
{
- struct netbsd32_export_args args32;
+ struct netbsd32_export_args exp32;
+ struct netbsd32_export_args const *argp32 = argp;
int error = 0;
for (size_t i = 0; i < nexports; i++) {
- error = copyin(argp, &args32, sizeof args32);
+ error = copyin(argp32, &exp32, sizeof exp32);
if (error)
break;
- exp->ex_flags = args32.ex_flags;
- exp->ex_root = args32.ex_root;
- exp->ex_anon = args32.ex_anon;
- exp->ex_addr = NETBSD32PTR64(args32.ex_addr);
- exp->ex_addrlen = args32.ex_addrlen;
- exp->ex_mask = NETBSD32PTR64(args32.ex_mask);
- exp->ex_masklen = args32.ex_masklen;
- exp->ex_indexfile = NETBSD32PTR64(args32.ex_indexfile);
+ exp->ex_flags = exp32.ex_flags;
+ exp->ex_root = exp32.ex_root;
+ exp->ex_anon = exp32.ex_anon;
+ exp->ex_addr = NETBSD32PTR64(exp32.ex_addr);
+ exp->ex_addrlen = exp32.ex_addrlen;
+ exp->ex_mask = NETBSD32PTR64(exp32.ex_mask);
+ exp->ex_masklen = exp32.ex_masklen;
+ exp->ex_indexfile = NETBSD32PTR64(exp32.ex_indexfile);
exp++;
+ argp32++;
}
return error;
Home |
Main Index |
Thread Index |
Old Index