Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/03fd0b8b884a
branches:  netbsd-8
changeset: 434443:03fd0b8b884a
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Nov 27 14:07:53 2017 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #396):
        sys/compat/netbsd32/netbsd32_ioctl.h: revision 1.57
        sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.90
Add support for SIOCGIFGENERIC and SIOCSIFGENERIC ioctls.

diffstat:

 sys/compat/netbsd32/netbsd32_ioctl.c |  25 +++++++++++++++++++++----
 sys/compat/netbsd32/netbsd32_ioctl.h |   5 ++++-
 2 files changed, 25 insertions(+), 5 deletions(-)

diffs (81 lines):

diff -r c835403b5dda -r 03fd0b8b884a sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c      Mon Nov 27 12:00:37 2017 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c      Mon Nov 27 14:07:53 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_ioctl.c,v 1.89 2017/01/14 16:34:44 maya Exp $ */
+/*     $NetBSD: netbsd32_ioctl.c,v 1.89.8.1 2017/11/27 14:07:53 martin Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.89 2017/01/14 16:34:44 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.89.8.1 2017/11/27 14:07:53 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -116,8 +116,14 @@
         * union member needs to be converted to 64 bits... this
         * is very driver specific and so we ignore it for now..
         */
-       if (cmd == SIOCGIFDATA || cmd == SIOCZIFDATA)
+       switch (cmd) {
+       case SIOCGIFDATA:
+       case SIOCZIFDATA:
+       case SIOCGIFGENERIC:
+       case SIOCSIFGENERIC:
                p->ifr_data = (void *)NETBSD32PTR64(s32p->ifr_data);
+               break;
+       }
 }
 
 static inline void
@@ -534,8 +540,14 @@
         * is very driver specific and so we ignore it for now..
         */
        memcpy(s32p, p, sizeof *s32p);
-       if (cmd == SIOCGIFDATA || cmd == SIOCZIFDATA)
+       switch (cmd) {
+       case SIOCGIFDATA:
+       case SIOCZIFDATA:
+       case SIOCGIFGENERIC:
+       case SIOCSIFGENERIC:
                NETBSD32PTR32(s32p->ifr_data, p->ifr_data);
+               break;
+       }
 }
 
 static inline void
@@ -1233,6 +1245,11 @@
        case SIOCGIFMEDIA32:
                IOCTL_STRUCT_CONV_TO(SIOCGIFMEDIA, ifmediareq);
 
+       case SIOCGIFGENERIC32:
+               IOCTL_STRUCT_CONV_TO(SIOCGIFGENERIC, ifreq);
+       case SIOCSIFGENERIC32:
+               IOCTL_STRUCT_CONV_TO(SIOCSIFGENERIC, ifreq);
+
        case PPPOESETPARMS32:
                IOCTL_STRUCT_CONV_TO(PPPOESETPARMS, pppoediscparms);
        case PPPOEGETPARMS32:
diff -r c835403b5dda -r 03fd0b8b884a sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h      Mon Nov 27 12:00:37 2017 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h      Mon Nov 27 14:07:53 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_ioctl.h,v 1.56 2016/12/26 23:05:06 christos Exp $     */
+/*     $NetBSD: netbsd32_ioctl.h,v 1.56.8.1 2017/11/27 14:07:53 martin Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -374,6 +374,9 @@
 #define        SIOCSIFMEDIA32  _IOWR('i', 53, struct netbsd32_ifreq)   /* set net media */
 #define        OSIOCSIFMEDIA32 _IOWR('i', 53, struct netbsd32_oifreq)  /* set net media */
 
+#define        SIOCSIFGENERIC32 _IOW('i', 57, struct netbsd32_ifreq)   /* generic IF set op */
+#define        SIOCGIFGENERIC32 _IOWR('i', 58, struct netbsd32_ifreq)  /* generic IF get op */
+
 #define        SIOCIFGCLONERS32 _IOWR('i', 120, struct netbsd32_if_clonereq) /* get cloners */
 
 #define        SIOCSIFMTU32     _IOW('i', 127, struct netbsd32_ifreq)  /* set ifnet mtu */



Home | Main Index | Thread Index | Old Index