svn commit: r341474 - in head/sys: kern vm
Brooks Davis
brooks at FreeBSD.org
Tue Dec 4 16:48:49 UTC 2018
Author: brooks
Date: Tue Dec 4 16:48:47 2018
New Revision: 341474
URL: https://svnweb.freebsd.org/changeset/base/341474
Log:
Normalize COMPAT_43 syscall declarations.
Have ogetkerninfo, ogetpagesize, ogethostname, osethostname, and oaccept
declare o<foo>_args structs rather than non-compat ones. Due to a
failure to use NOARGS in most cases this adds only one new declaration.
No changes required in freebsd32 as only ogetpagesize() is implemented
and it has a 32-bit specific implementation.
Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15816
Modified:
head/sys/kern/kern_xxx.c
head/sys/kern/syscalls.master
head/sys/kern/uipc_syscalls.c
head/sys/vm/vm_mmap.c
Modified: head/sys/kern/kern_xxx.c
==============================================================================
--- head/sys/kern/kern_xxx.c Tue Dec 4 16:43:50 2018 (r341473)
+++ head/sys/kern/kern_xxx.c Tue Dec 4 16:48:47 2018 (r341474)
@@ -50,15 +50,8 @@ __FBSDID("$FreeBSD$");
#if defined(COMPAT_43)
-#ifndef _SYS_SYSPROTO_H_
-struct gethostname_args {
- char *hostname;
- u_int len;
-};
-#endif
-/* ARGSUSED */
int
-ogethostname(struct thread *td, struct gethostname_args *uap)
+ogethostname(struct thread *td, struct ogethostname_args *uap)
{
int name[2];
size_t len = uap->len;
@@ -69,15 +62,8 @@ ogethostname(struct thread *td, struct gethostname_arg
1, 0, 0, 0, 0));
}
-#ifndef _SYS_SYSPROTO_H_
-struct sethostname_args {
- char *hostname;
- u_int len;
-};
-#endif
-/* ARGSUSED */
int
-osethostname(struct thread *td, struct sethostname_args *uap)
+osethostname(struct thread *td, struct osethostname_args *uap)
{
int name[2];
@@ -104,15 +90,7 @@ ogethostid(struct thread *td, struct ogethostid_args *
return (kernel_sysctl(td, name, 2, (long *)td->td_retval, &len,
NULL, 0, NULL, 0));
}
-#endif /* COMPAT_43 */
-#ifdef COMPAT_43
-#ifndef _SYS_SYSPROTO_H_
-struct osethostid_args {
- long hostid;
-};
-#endif
-/* ARGSUSED */
int
osethostid(struct thread *td, struct osethostid_args *uap)
{
@@ -187,16 +165,8 @@ static struct {
*/
static char bsdi_strings[80]; /* It had better be less than this! */
-#ifndef _SYS_SYSPROTO_H_
-struct getkerninfo_args {
- int op;
- char *where;
- size_t *size;
- int arg;
-};
-#endif
int
-ogetkerninfo(struct thread *td, struct getkerninfo_args *uap)
+ogetkerninfo(struct thread *td, struct ogetkerninfo_args *uap)
{
int error, name[6];
size_t size;
Modified: head/sys/kern/syscalls.master
==============================================================================
--- head/sys/kern/syscalls.master Tue Dec 4 16:43:50 2018 (r341473)
+++ head/sys/kern/syscalls.master Tue Dec 4 16:48:47 2018 (r341474)
@@ -453,10 +453,10 @@
_Inout_opt_ size_t *size,
int arg
);
- } getkerninfo getkerninfo_args int
+ }
64 AUE_NULL COMPAT {
int getpagesize(void);
- } getpagesize getpagesize_args int
+ }
65 AUE_MSYNC STD {
int msync(
_In_ void *addr,
@@ -570,13 +570,13 @@
_Out_writes_z_(len) char *hostname,
u_int len
);
- } gethostname gethostname_args int
+ }
88 AUE_SYSCTL COMPAT {
int sethostname(
_In_reads_z_(len) char *hostname,
u_int len
);
- } sethostname sethostname_args int
+ }
89 AUE_GETDTABLESIZE STD {
int getdtablesize(void);
}
@@ -638,7 +638,7 @@
_Out_writes_bytes_opt_(*anamelen) struct sockaddr *name,
int *anamelen
);
- } accept accept_args int
+ }
100 AUE_GETPRIORITY STD {
int getpriority(
int which,
Modified: head/sys/kern/uipc_syscalls.c
==============================================================================
--- head/sys/kern/uipc_syscalls.c Tue Dec 4 16:43:50 2018 (r341473)
+++ head/sys/kern/uipc_syscalls.c Tue Dec 4 16:48:47 2018 (r341474)
@@ -455,9 +455,7 @@ sys_accept4(td, uap)
#ifdef COMPAT_OLDSOCK
int
-oaccept(td, uap)
- struct thread *td;
- struct accept_args *uap;
+oaccept(struct thread *td, struct oaccept_args *uap)
{
return (accept1(td, uap->s, uap->name, uap->anamelen,
Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c Tue Dec 4 16:43:50 2018 (r341473)
+++ head/sys/vm/vm_mmap.c Tue Dec 4 16:48:47 2018 (r341474)
@@ -129,14 +129,8 @@ sys_sstk(struct thread *td, struct sstk_args *uap)
}
#if defined(COMPAT_43)
-#ifndef _SYS_SYSPROTO_H_
-struct getpagesize_args {
- int dummy;
-};
-#endif
-
int
-ogetpagesize(struct thread *td, struct getpagesize_args *uap)
+ogetpagesize(struct thread *td, struct ogetpagesize_args *uap)
{
td->td_retval[0] = PAGE_SIZE;
More information about the svn-src-all
mailing list