Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump regen: cast rval to return type instead of just usi...
details: https://anonhg.NetBSD.org/src/rev/f888ee55c7b0
branches: trunk
changeset: 762511:f888ee55c7b0
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Feb 22 10:34:06 2011 +0000
description:
regen: cast rval to return type instead of just using rval[0]
diffstat:
sys/rump/include/rump/rump_syscalls.h | 2 +-
sys/rump/librump/rumpkern/rump_syscalls.c | 632 +++++++++++++++---------------
2 files changed, 317 insertions(+), 317 deletions(-)
diffs (truncated from 1935 to 300 lines):
diff -r 42ee5b61674a -r f888ee55c7b0 sys/rump/include/rump/rump_syscalls.h
--- a/sys/rump/include/rump/rump_syscalls.h Tue Feb 22 10:33:12 2011 +0000
+++ b/sys/rump/include/rump/rump_syscalls.h Tue Feb 22 10:34:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.h,v 1.43 2011/02/21 23:31:00 pooka Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.44 2011/02/22 10:34:06 pooka Exp $ */
/*
* System call protos in rump namespace.
diff -r 42ee5b61674a -r f888ee55c7b0 sys/rump/librump/rumpkern/rump_syscalls.c
--- a/sys/rump/librump/rumpkern/rump_syscalls.c Tue Feb 22 10:33:12 2011 +0000
+++ b/sys/rump/librump/rumpkern/rump_syscalls.c Tue Feb 22 10:34:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.c,v 1.65 2011/02/21 23:31:00 pooka Exp $ */
+/* $NetBSD: rump_syscalls.c,v 1.66 2011/02/22 10:34:06 pooka Exp $ */
/*
* System call vector and marshalling for rump.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.65 2011/02/21 23:31:00 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.66 2011/02/22 10:34:06 pooka Exp $");
#include <sys/param.h>
#include <sys/fstypes.h>
@@ -80,9 +80,9 @@
error = rsys_syscall(SYS_read, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(ssize_t *)rval = (ssize_t)-1;
}
- return rval[0];
+ return *(ssize_t *)rval;
}
rsys_alias(sys_read,rump_enosys)
@@ -101,9 +101,9 @@
error = rsys_syscall(SYS_write, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(ssize_t *)rval = (ssize_t)-1;
}
- return rval[0];
+ return *(ssize_t *)rval;
}
rsys_alias(sys_write,rump_enosys)
@@ -122,9 +122,9 @@
error = rsys_syscall(SYS_open, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_open,rump_enosys)
@@ -141,9 +141,9 @@
error = rsys_syscall(SYS_close, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_close,rump_enosys)
@@ -161,9 +161,9 @@
error = rsys_syscall(SYS_link, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_link,rump_enosys)
@@ -180,9 +180,9 @@
error = rsys_syscall(SYS_unlink, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_unlink,rump_enosys)
@@ -199,9 +199,9 @@
error = rsys_syscall(SYS_chdir, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_chdir,rump_enosys)
@@ -218,9 +218,9 @@
error = rsys_syscall(SYS_fchdir, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_fchdir,rump_enosys)
@@ -239,9 +239,9 @@
error = rsys_syscall(SYS_compat_50_mknod, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(compat_50_sys_mknod,rump_enosys)
@@ -259,9 +259,9 @@
error = rsys_syscall(SYS_chmod, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_chmod,rump_enosys)
@@ -280,9 +280,9 @@
error = rsys_syscall(SYS_chown, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_chown,rump_enosys)
@@ -293,7 +293,7 @@
register_t rval[2] = {0, 0};
rsys_syscall(SYS_getpid, NULL, 0, rval);
- return rval[0];
+ return *(pid_t *)rval;
}
rsys_alias(sys_getpid_with_ppid,rump_enosys)
@@ -311,9 +311,9 @@
error = rsys_syscall(SYS_unmount, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_unmount,rump_enosys)
@@ -330,9 +330,9 @@
error = rsys_syscall(SYS_setuid, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_setuid,rump_enosys)
@@ -343,7 +343,7 @@
register_t rval[2] = {0, 0};
rsys_syscall(SYS_getuid, NULL, 0, rval);
- return rval[0];
+ return *(uid_t *)rval;
}
rsys_alias(sys_getuid_with_euid,rump_enosys)
@@ -354,7 +354,7 @@
register_t rval[2] = {0, 0};
rsys_syscall(SYS_geteuid, NULL, 0, rval);
- return rval[0];
+ return *(uid_t *)rval;
}
rsys_alias(sys_geteuid,rump_enosys)
@@ -373,9 +373,9 @@
error = rsys_syscall(SYS_recvmsg, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(ssize_t *)rval = (ssize_t)-1;
}
- return rval[0];
+ return *(ssize_t *)rval;
}
rsys_alias(sys_recvmsg,rump_enosys)
@@ -394,9 +394,9 @@
error = rsys_syscall(SYS_sendmsg, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(ssize_t *)rval = (ssize_t)-1;
}
- return rval[0];
+ return *(ssize_t *)rval;
}
rsys_alias(sys_sendmsg,rump_enosys)
@@ -418,9 +418,9 @@
error = rsys_syscall(SYS_recvfrom, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(ssize_t *)rval = (ssize_t)-1;
}
- return rval[0];
+ return *(ssize_t *)rval;
}
rsys_alias(sys_recvfrom,rump_enosys)
@@ -439,9 +439,9 @@
error = rsys_syscall(SYS_accept, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_accept,rump_enosys)
@@ -460,9 +460,9 @@
error = rsys_syscall(SYS_getpeername, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_getpeername,rump_enosys)
@@ -481,9 +481,9 @@
error = rsys_syscall(SYS_getsockname, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_getsockname,rump_enosys)
@@ -501,9 +501,9 @@
error = rsys_syscall(SYS_access, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
}
- return rval[0];
+ return *(int *)rval;
}
rsys_alias(sys_access,rump_enosys)
@@ -521,9 +521,9 @@
error = rsys_syscall(SYS_chflags, &callarg, sizeof(callarg), rval);
rsys_seterrno(error);
if (error) {
- rval[0] = -1;
+ *(int *)rval = (int)-1;
Home |
Main Index |
Thread Index |
Old Index