Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/netbsd32 COMPAT_NETBSD32: No need to have compat_...



details:   https://anonhg.NetBSD.org/src/rev/186c4d0e9097
branches:  trunk
changeset: 378314:186c4d0e9097
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Jul 29 12:48:15 2023 +0000

description:
COMPAT_NETBSD32: No need to have compat_100_netbsd32_kevent_fetch_timeout.
NFCI.

diffstat:

 sys/compat/netbsd32/netbsd32_compat_100.c |  22 +++-------------------
 sys/compat/netbsd32/netbsd32_event.c      |   6 +++---
 sys/compat/netbsd32/netbsd32_event.h      |   3 ++-
 3 files changed, 8 insertions(+), 23 deletions(-)

diffs (94 lines):

diff -r 05aa01336238 -r 186c4d0e9097 sys/compat/netbsd32/netbsd32_compat_100.c
--- a/sys/compat/netbsd32/netbsd32_compat_100.c Sat Jul 29 12:39:20 2023 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_100.c Sat Jul 29 12:48:15 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_100.c,v 1.2 2023/07/29 12:38:25 rin Exp $ */
+/*     $NetBSD: netbsd32_compat_100.c,v 1.3 2023/07/29 12:48:15 rin Exp $ */
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_100.c,v 1.2 2023/07/29 12:38:25 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_100.c,v 1.3 2023/07/29 12:48:15 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/event.h>
@@ -46,22 +46,6 @@
 #include <compat/netbsd32/netbsd32_conv.h>
 #include <compat/netbsd32/netbsd32_event.h>
 
-static int
-compat_100_netbsd32_kevent_fetch_timeout(const void *src, void *dest,
-    size_t length)
-{
-       struct netbsd32_timespec ts32;
-       int error;
-
-       KASSERT(length == sizeof(struct timespec));
-
-       error = copyin(src, &ts32, sizeof(ts32));
-       if (error)
-               return error;
-       netbsd32_to_timespec(&ts32, (struct timespec *)dest);
-       return 0;
-}
-
 static void
 compat_100_netbsd32_to_kevent(const struct netbsd32_kevent100 *ke32,
     struct kevent *ke)
@@ -134,7 +118,7 @@ compat_100_netbsd32___kevent50(struct lw
                syscallarg(netbsd32_timespecp_t) timeout;
        } */
        struct kevent_ops netbsd32_kevent_ops = {
-               .keo_fetch_timeout = compat_100_netbsd32_kevent_fetch_timeout,
+               .keo_fetch_timeout = netbsd32_kevent_fetch_timeout,
                .keo_fetch_changes = compat_100_netbsd32_kevent_fetch_changes,
                .keo_put_events = compat_100_netbsd32_kevent_put_events,
        };
diff -r 05aa01336238 -r 186c4d0e9097 sys/compat/netbsd32/netbsd32_event.c
--- a/sys/compat/netbsd32/netbsd32_event.c      Sat Jul 29 12:39:20 2023 +0000
+++ b/sys/compat/netbsd32/netbsd32_event.c      Sat Jul 29 12:48:15 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_event.c,v 1.13 2023/07/29 12:38:25 rin Exp $  */
+/*     $NetBSD: netbsd32_event.c,v 1.14 2023/07/29 12:48:15 rin Exp $  */
 
 /*
  *  Copyright (c) 2005 The NetBSD Foundation.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.13 2023/07/29 12:38:25 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.14 2023/07/29 12:48:15 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -46,7 +46,7 @@
 #include <compat/netbsd32/netbsd32_conv.h>
 #include <compat/netbsd32/netbsd32_event.h>
 
-static int
+int
 netbsd32_kevent_fetch_timeout(const void *src, void *dest, size_t length)
 {
        struct netbsd32_timespec ts32;
diff -r 05aa01336238 -r 186c4d0e9097 sys/compat/netbsd32/netbsd32_event.h
--- a/sys/compat/netbsd32/netbsd32_event.h      Sat Jul 29 12:39:20 2023 +0000
+++ b/sys/compat/netbsd32/netbsd32_event.h      Sat Jul 29 12:48:15 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_event.h,v 1.1 2023/07/29 12:38:25 rin Exp $   */
+/*     $NetBSD: netbsd32_event.h,v 1.2 2023/07/29 12:48:15 rin Exp $   */
 
 /*
  * Copyright (c) 2023 NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
 #include <compat/netbsd32/netbsd32.h>
 
 /* netbsd32_event.c */
+int netbsd32_kevent_fetch_timeout(const void *, void *, size_t);
 int netbsd32_kevent1(register_t *, int, const netbsd32_kevent100p_t,
     netbsd32_size_t, netbsd32_kevent100p_t, netbsd32_size_t,
     netbsd32_timespecp_t, struct kevent_ops *);



Home | Main Index | Thread Index | Old Index