Module Name: src
Committed By: kre
Date: Sat Apr 6 17:27:59 UTC 2019
Modified Files:
src/sys/compat/freebsd: freebsd_syscall.c
Log Message:
Revert previous. Instead change ufetch_long() to ufetch_int() in
both calls (and also remove the cast on the earlier).
These replaced fuword, to fetch a register_t (ie: int).
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/freebsd/freebsd_syscall.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/freebsd/freebsd_syscall.c
diff -u src/sys/compat/freebsd/freebsd_syscall.c:1.4 src/sys/compat/freebsd/freebsd_syscall.c:1.5
--- src/sys/compat/freebsd/freebsd_syscall.c:1.4 Sat Apr 6 16:22:09 2019
+++ src/sys/compat/freebsd/freebsd_syscall.c Sat Apr 6 17:27:58 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: freebsd_syscall.c,v 1.4 2019/04/06 16:22:09 kre Exp $ */
+/* $NetBSD: freebsd_syscall.c,v 1.5 2019/04/06 17:27:58 kre Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: freebsd_syscall.c,v 1.4 2019/04/06 16:22:09 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: freebsd_syscall.c,v 1.5 2019/04/06 17:27:58 kre Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -88,7 +88,7 @@ freebsd_syscall(struct trapframe *frame)
/*
* Code is first argument, followed by actual args.
*/
- error = ufetch_long((void *)params, (u_long *)&code);
+ error = ufetch_int((void *)params, &code);
if (error)
goto bad;
params += sizeof(int);
@@ -98,9 +98,9 @@ freebsd_syscall(struct trapframe *frame)
* Like syscall, but code is a quad, so as to maintain
* quad alignment for the rest of the arguments.
*/
- error = ufetch_long((void *)(params +
+ error = ufetch_int((void *)(params +
_QUAD_LOWWORD * sizeof(int)),
- (u_long *)&code);
+ &code);
if (error)
goto bad;
params += sizeof(quad_t);