Module Name: src Committed By: macallan Date: Tue Aug 30 07:06:39 UTC 2011
Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: add WSDISPLAYIO_ADDSCREEN To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.36 -r1.37 src/sys/compat/netbsd32/netbsd32_ioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.57 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.58 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.57 Sat Aug 27 19:25:35 2011 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Tue Aug 30 07:06:39 2011 @@ -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); Index: src/sys/compat/netbsd32/netbsd32_ioctl.h diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.36 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.37 --- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.36 Sat Aug 27 19:25:35 2011 +++ src/sys/compat/netbsd32/netbsd32_ioctl.h Tue Aug 30 07:06:39 2011 @@ -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 */