git: ba4e5253a38e - main - syscalls: normalize orecvfrom and ogetsockname

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 29 Nov 2021 22:05:29 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=ba4e5253a38e13ff14ac25fbef98b24be179d529

commit ba4e5253a38e13ff14ac25fbef98b24be179d529
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-29 22:02:59 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-29 22:04:42 +0000

    syscalls: normalize orecvfrom and ogetsockname
    
    Declare o<foo>_args rather than reusing the equivalent <foo>_args
    structs.  Avoiding the addition of a new type isn't worth the
    gratutious differences.
    
    Reviewed by:    kib, imp
---
 sys/kern/syscalls.master | 10 +++++-----
 sys/kern/uipc_syscalls.c |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index a989d7f5f9b6..6e89f2c313ea 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -816,7 +816,7 @@
 		    mode_t mode
 		);
 	}
-125	AUE_RECVFROM	COMPAT|NOARGS|CAPENABLED {
+125	AUE_RECVFROM	COMPAT|CAPENABLED {
 		int recvfrom(
 		    int s,
 		    _Out_writes_(len) void *buf,
@@ -825,7 +825,7 @@
 		    _Out_writes_bytes_(*fromlenaddr) struct sockaddr *from,
 		    _Inout_ __socklen_t *fromlenaddr
 		);
-	} recvfrom recvfrom_args int
+	}
 126	AUE_SETREUID	STD|CAPENABLED {
 		int setreuid(
 		    int ruid,
@@ -963,13 +963,13 @@
 149	AUE_O_QUOTA	COMPAT {
 		int quota(void);
 	}
-150	AUE_GETSOCKNAME	COMPAT|NOARGS|CAPENABLED {
+150	AUE_GETSOCKNAME	COMPAT|CAPENABLED {
 		int getsockname(
-		    int fdec,
+		    int fdes,
 		    _Out_writes_bytes_(*alen) struct sockaddr *asa,
 		    _Inout_ __socklen_t *alen
 		);
-	} getsockname getsockname_args int
+	}
 151-153	AUE_NULL	RESERVED
 ; 154 is initialised by the NLM code, if present.
 154	AUE_NULL	NOSTD {
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 3111ce7e16e4..0e083e058916 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1103,7 +1103,7 @@ sys_recvfrom(struct thread *td, struct recvfrom_args *uap)
 
 #ifdef COMPAT_OLDSOCK
 int
-orecvfrom(struct thread *td, struct recvfrom_args *uap)
+orecvfrom(struct thread *td, struct orecvfrom_args *uap)
 {
 	return (kern_recvfrom(td, uap->s, uap->buf, uap->len,
 	    uap->flags | MSG_COMPAT, uap->from, uap->fromlenaddr));
@@ -1411,7 +1411,7 @@ sys_getsockname(struct thread *td, struct getsockname_args *uap)
 
 #ifdef COMPAT_OLDSOCK
 int
-ogetsockname(struct thread *td, struct getsockname_args *uap)
+ogetsockname(struct thread *td, struct ogetsockname_args *uap)
 {
 	return (user_getsockname(td, uap->fdes, uap->asa, uap->alen, true));
 }