Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 fix style consistency.
details: https://anonhg.NetBSD.org/src/rev/beb4db3c9b50
branches: trunk
changeset: 995480:beb4db3c9b50
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Dec 24 20:39:17 2018 +0000
description:
fix style consistency.
remove obsolete comments or commented code.
NFC.
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 335 +++++++++++++++++++++++----------
1 files changed, 227 insertions(+), 108 deletions(-)
diffs (truncated from 1323 to 300 lines):
diff -r 2bc4d491c187 -r beb4db3c9b50 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Mon Dec 24 20:27:57 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Mon Dec 24 20:39:17 2018 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.219 2018/12/24 20:27:57 mrg Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.220 2018/12/24 20:39:17 mrg Exp $ */
/*
- * Copyright (c) 1998, 2001, 2008 Matthew R. Green
+ * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,15 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.219 2018/12/24 20:27:57 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.220 2018/12/24 20:39:17 mrg Exp $");
+
+/*
+ * below are all the standard NetBSD system calls, in the 32bit
+ * environment, with the necessary conversions to 64bit before calling
+ * the real syscall. anything that needs special attention is handled
+ * elsewhere - this file should only contain structure assignment and
+ * calls to the original function.
+ */
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -42,7 +50,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
-//#define msg __msg /* Don't ask me! */
#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -166,13 +173,6 @@
#endif
};
-/*
- * below are all the standard NetBSD system calls, in the 32bit
- * environment, with the necessary conversions to 64bit before
- * calling the real syscall. anything that needs special
- * attention is handled elsewhere.
- */
-
int
netbsd32_exit(struct lwp *l, const struct netbsd32_exit_args *uap, register_t *retval)
{
@@ -257,7 +257,7 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TOP_UAP(link, const char);
- return (sys_link(l, &ua, retval));
+ return sys_link(l, &ua, retval);
}
int
@@ -270,7 +270,7 @@
NETBSD32TOP_UAP(path, const char);
- return (sys_unlink(l, &ua, retval));
+ return sys_unlink(l, &ua, retval);
}
int
@@ -283,7 +283,7 @@
NETBSD32TOP_UAP(path, const char);
- return (sys_chdir(l, &ua, retval));
+ return sys_chdir(l, &ua, retval);
}
int
@@ -296,7 +296,7 @@
NETBSD32TO64_UAP(fd);
- return (sys_fchdir(l, &ua, retval));
+ return sys_fchdir(l, &ua, retval);
}
int
@@ -324,7 +324,7 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(mode);
- return (sys_chmod(l, &ua, retval));
+ return sys_chmod(l, &ua, retval);
}
int
@@ -341,7 +341,7 @@
NETBSD32TO64_UAP(uid);
NETBSD32TO64_UAP(gid);
- return (sys_chown(l, &ua, retval));
+ return sys_chown(l, &ua, retval);
}
int
@@ -353,9 +353,11 @@
struct sys_obreak_args ua;
NETBSD32TOP_UAP(nsize, char);
- return (sys_obreak(l, &ua, retval));
+
+ return sys_obreak(l, &ua, retval);
}
+// XXX move into compat_40
int
netbsd32_mount(struct lwp *l, const struct netbsd32_mount_args *uap, register_t *retval)
{
@@ -372,7 +374,8 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(flags);
NETBSD32TOP_UAP(data, void);
- return (compat_40_sys_mount(l, &ua, retval));
+
+ return compat_40_sys_mount(l, &ua, retval);
#else
return ENOSYS;
#endif
@@ -389,7 +392,8 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(flags);
- return (sys_unmount(l, &ua, retval));
+
+ return sys_unmount(l, &ua, retval);
}
int
@@ -401,7 +405,8 @@
struct sys_setuid_args ua;
NETBSD32TO64_UAP(uid);
- return (sys_setuid(l, &ua, retval));
+
+ return sys_setuid(l, &ua, retval);
}
int
@@ -417,7 +422,8 @@
NETBSD32TO64_UAP(s);
NETBSD32TOP_UAP(name, struct sockaddr);
NETBSD32TOP_UAP(anamelen, socklen_t);
- return (sys_accept(l, &ua, retval));
+
+ return sys_accept(l, &ua, retval);
}
int
@@ -434,7 +440,8 @@
NETBSD32TOP_UAP(asa, struct sockaddr);
NETBSD32TOP_UAP(alen, socklen_t);
/* NB: do the protocol specific sockaddrs need to be converted? */
- return (sys_getpeername(l, &ua, retval));
+
+ return sys_getpeername(l, &ua, retval);
}
int
@@ -450,7 +457,8 @@
NETBSD32TO64_UAP(fdes);
NETBSD32TOP_UAP(asa, struct sockaddr);
NETBSD32TOP_UAP(alen, socklen_t);
- return (sys_getsockname(l, &ua, retval));
+
+ return sys_getsockname(l, &ua, retval);
}
int
@@ -480,7 +488,7 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(flags);
- return (sys_chflags(l, &ua, retval));
+ return sys_chflags(l, &ua, retval);
}
int
@@ -495,7 +503,7 @@
NETBSD32TO64_UAP(fd);
NETBSD32TO64_UAP(flags);
- return (sys_fchflags(l, &ua, retval));
+ return sys_fchflags(l, &ua, retval);
}
int
@@ -510,7 +518,7 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(flags);
- return (sys_lchflags(l, &ua, retval));
+ return sys_lchflags(l, &ua, retval);
}
int
@@ -525,7 +533,7 @@
NETBSD32TO64_UAP(pid);
NETBSD32TO64_UAP(signum);
- return (sys_kill(l, &ua, retval));
+ return sys_kill(l, &ua, retval);
}
int
@@ -538,7 +546,7 @@
NETBSD32TO64_UAP(fd);
- return (sys_dup(l, &ua, retval));
+ return sys_dup(l, &ua, retval);
}
int
@@ -556,7 +564,8 @@
NETBSD32TOX_UAP(size, size_t);
NETBSD32TOX_UAP(offset, u_long);
NETBSD32TO64_UAP(scale);
- return (sys_profil(l, &ua, retval));
+
+ return sys_profil(l, &ua, retval);
}
int
@@ -574,7 +583,8 @@
NETBSD32TO64_UAP(ops);
NETBSD32TO64_UAP(facs);
NETBSD32TO64_UAP(pid);
- return (sys_ktrace(l, &ua, retval));
+
+ return sys_ktrace(l, &ua, retval);
}
int
@@ -590,7 +600,8 @@
NETBSD32TOP_UAP(label, const char);
NETBSD32TOP_UAP(addr, void);
NETBSD32TO64_UAP(len);
- return (sys_utrace(l, &ua, retval));
+
+ return sys_utrace(l, &ua, retval);
}
int
@@ -604,7 +615,8 @@
NETBSD32TOP_UAP(namebuf, char);
NETBSD32TO64_UAP(namelen);
- return (sys___getlogin(l, &ua, retval));
+
+ return sys___getlogin(l, &ua, retval);
}
int
@@ -616,7 +628,8 @@
struct sys___setlogin_args ua;
NETBSD32TOP_UAP(namebuf, char);
- return (sys___setlogin(l, &ua, retval));
+
+ return sys___setlogin(l, &ua, retval);
}
int
@@ -628,7 +641,8 @@
struct sys_acct_args ua;
NETBSD32TOP_UAP(path, const char);
- return (sys_acct(l, &ua, retval));
+
+ return sys_acct(l, &ua, retval);
}
int
@@ -641,7 +655,7 @@
NETBSD32TOP_UAP(path, const char);
- return (sys_revoke(l, &ua, retval));
+ return sys_revoke(l, &ua, retval);
}
int
@@ -656,7 +670,7 @@
NETBSD32TOP_UAP(path, const char);
NETBSD32TOP_UAP(link, const char);
- return (sys_symlink(l, &ua, retval));
+ return sys_symlink(l, &ua, retval);
}
Home |
Main Index |
Thread Index |
Old Index