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 WSDISPLAYIO_ADDSCREEN
details: https://anonhg.NetBSD.org/src/rev/a475d979cd51
branches: trunk
changeset: 769007:a475d979cd51
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Aug 30 07:06:39 2011 +0000
description:
add WSDISPLAYIO_ADDSCREEN
diffstat:
sys/compat/netbsd32/netbsd32_ioctl.c | 35 +++++++++++++++++++++++++++++++++--
sys/compat/netbsd32/netbsd32_ioctl.h | 11 ++++++++++-
2 files changed, 43 insertions(+), 3 deletions(-)
diffs (109 lines):
diff -r 3f3bb234308d -r a475d979cd51 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Tue Aug 30 06:51:27 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Tue Aug 30 07:06:39 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.57 2011/08/27 19:25:35 bouyer Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.58 2011/08/30 07:06:39 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.57 2011/08/27 19:25:35 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.58 2011/08/30 07:06:39 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,6 +126,12 @@
struct netbsd32_sioc_sg_req *,
u_long);
+/* wsdisplay stuff */
+static inline void netbsd32_to_wsdisplay_addscreendata(
+ struct netbsd32_wsdisplay_addscreendata *,
+ struct wsdisplay_addscreendata *,
+ u_long);
+
/* convert to/from different structures */
static inline void
@@ -288,6 +294,17 @@
p->wc_count = s32p->wc_count;
}
+/* wsdisplay stuff */
+static inline void
+netbsd32_to_wsdisplay_addscreendata(struct netbsd32_wsdisplay_addscreendata *asd32,
+ struct wsdisplay_addscreendata *asd,
+ u_long cmd)
+{
+ asd->screentype = (char *)NETBSD32PTR64(asd32->screentype);
+ asd->emul = (char *)NETBSD32PTR64(asd32->emul);
+ asd->idx = asd32->idx;
+}
+
/*
* handle ioctl conversions from 64-bit kernel -> netbsd32
*/
@@ -452,6 +469,17 @@
s32p->wc_count = p->wc_count;
}
+/* wsdisplay stuff */
+static inline void
+netbsd32_from_wsdisplay_addscreendata(struct wsdisplay_addscreendata *asd,
+ struct netbsd32_wsdisplay_addscreendata *asd32,
+ u_long cmd)
+{
+ NETBSD32PTR32(asd32->screentype, asd->screentype);
+ NETBSD32PTR32(asd32->emul, asd->emul);
+ asd32->idx = asd->idx;
+}
+
static inline void
netbsd32_from_u_long(u_long *p, netbsd32_u_long *s32p, u_long cmd)
{
@@ -763,6 +791,9 @@
case WDOGIOC_GWDOGS32:
IOCTL_STRUCT_CONV_TO(WDOGIOC_GWDOGS, wdog_conf);
+ case WSDISPLAYIO_ADDSCREEN32:
+ IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_ADDSCREEN, wsdisplay_addscreendata);
+
default:
#ifdef NETBSD32_MD_IOCTL
error = netbsd32_md_ioctl(fp, com, data32, l);
diff -r 3f3bb234308d -r a475d979cd51 sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h Tue Aug 30 06:51:27 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h Tue Aug 30 07:06:39 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.h,v 1.36 2011/08/27 19:25:35 bouyer Exp $ */
+/* $NetBSD: netbsd32_ioctl.h,v 1.37 2011/08/30 07:06:39 macallan Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -35,6 +35,8 @@
#include <dev/dkvar.h>
#include <dev/vndvar.h>
+#include <dev/wscons/wsconsio.h>
+
/* we define some handy macros here... */
#define IOCTL_STRUCT_CONV_TO(cmd, type) \
size = IOCPARM_LEN(cmd); \
@@ -87,6 +89,13 @@
#define DIOCWFORMAT32 _IOWR('d', 106, struct netbsd32_format_op)
#endif
+struct netbsd32_wsdisplay_addscreendata {
+ int idx; /* screen index */
+ netbsd32_charp screentype;
+ netbsd32_charp emul;
+};
+#define WSDISPLAYIO_ADDSCREEN32 _IOW('W', 78, struct netbsd32_wsdisplay_addscreendata)
+
/* 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