Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 add conversion goop for WSDISPLAYIO_LDFO...



details:   https://anonhg.NetBSD.org/src/rev/2eb1d5a3bcbe
branches:  trunk
changeset: 829155:2eb1d5a3bcbe
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Jan 19 23:38:56 2018 +0000

description:
add conversion goop for WSDISPLAYIO_LDFONT and _SFONT
tested on mips64

diffstat:

 sys/compat/netbsd32/netbsd32_ioctl.c |  48 ++++++++++++++++++++++++++++++++++-
 sys/compat/netbsd32/netbsd32_ioctl.h |  17 ++++++++++++-
 2 files changed, 62 insertions(+), 3 deletions(-)

diffs (114 lines):

diff -r a6e23fdb3a94 -r 2eb1d5a3bcbe sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c      Fri Jan 19 23:37:36 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c      Fri Jan 19 23:38:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_ioctl.c,v 1.90 2017/11/26 17:46:13 jmcneill Exp $     */
+/*     $NetBSD: netbsd32_ioctl.c,v 1.91 2018/01/19 23:38:56 macallan 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.90 2017/11/26 17:46:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.91 2018/01/19 23:38:56 macallan Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -400,6 +400,31 @@
 }
 
 static inline void
+netbsd32_to_wsdisplay_font(struct netbsd32_wsdisplay_font *f32,
+                                              struct wsdisplay_font *f,
+                                              u_long cmd)
+{
+       f->name = NETBSD32PTR64(f32->name);
+       f->firstchar = f32->firstchar;
+       f->numchars = f32->numchars;
+       f->encoding = f32->encoding;
+       f->fontwidth = f32->fontwidth;
+       f->fontheight = f32->fontheight;
+       f->stride = f32->stride;
+       f->bitorder = f32->bitorder;
+       f->byteorder = f32->byteorder;
+       f->data = NETBSD32PTR64(f32->data);
+}
+
+static inline void
+netbsd32_to_wsdisplay_usefontdata(struct netbsd32_wsdisplay_usefontdata *f32,
+                                              struct wsdisplay_usefontdata *f,
+                                              u_long cmd)
+{
+       f->name = NETBSD32PTR64(f32->name);
+}
+
+static inline void
 netbsd32_to_clockctl_settimeofday(
     const struct netbsd32_clockctl_settimeofday *s32p,
     struct clockctl_settimeofday *p,
@@ -767,6 +792,20 @@
 }
 
 static inline void
+netbsd32_from_wsdisplay_font(struct wsdisplay_font *f,
+                                       struct netbsd32_wsdisplay_font *f32,
+                                       u_long cmd)
+{
+}
+
+static inline void
+netbsd32_from_wsdisplay_usefontdata(struct wsdisplay_usefontdata *f,
+                                       struct netbsd32_wsdisplay_usefontdata *f32,
+                                       u_long cmd)
+{
+}
+
+static inline void
 netbsd32_from_ieee80211req(struct ieee80211req *ireq,
                           struct netbsd32_ieee80211req *ireq32, u_long cmd)
 {
@@ -1317,6 +1356,11 @@
        case WSDISPLAYIO_PUTCMAP32:
                IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_PUTCMAP, wsdisplay_cmap);
 
+       case WSDISPLAYIO_LDFONT32:
+               IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_LDFONT, wsdisplay_font);
+       case WSDISPLAYIO_SFONT32:
+               IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_SFONT, wsdisplay_usefontdata);
+
        case SIOCS8021132:
                IOCTL_STRUCT_CONV_TO(SIOCS80211, ieee80211req);
        case SIOCG8021132:
diff -r a6e23fdb3a94 -r 2eb1d5a3bcbe sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h      Fri Jan 19 23:37:36 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h      Fri Jan 19 23:38:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_ioctl.h,v 1.57 2017/11/26 17:46:13 jmcneill Exp $     */
+/*     $NetBSD: netbsd32_ioctl.h,v 1.58 2018/01/19 23:38:56 macallan Exp $     */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -179,6 +179,21 @@
 #define        WSDISPLAYIO_GCURSOR32   _IOWR('W', 73, struct netbsd32_wsdisplay_cursor)
 #define        WSDISPLAYIO_SCURSOR32   _IOW('W', 74, struct netbsd32_wsdisplay_cursor)
 
+struct netbsd32_wsdisplay_font {
+       netbsd32_charp name;
+       int firstchar, numchars;
+       int encoding;
+       u_int fontwidth, fontheight, stride;
+       int bitorder, byteorder;
+       netbsd32_charp data;
+};
+#define        WSDISPLAYIO_LDFONT32    _IOW('W', 77, struct netbsd32_wsdisplay_font)
+
+struct netbsd32_wsdisplay_usefontdata {
+       netbsd32_charp name;
+};
+#define        WSDISPLAYIO_SFONT32     _IOW('W', 80, struct netbsd32_wsdisplay_usefontdata)
+
 /* can wait! */
 #if 0
 dev/ccdvar.h:219:#define CCDIOCSET     _IOWR('F', 16, struct ccd_ioctl)   /* enable ccd */



Home | Main Index | Thread Index | Old Index