Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 translate WDOGIOC_GWDOGS
details: https://anonhg.NetBSD.org/src/rev/78a0a7f929f7
branches: trunk
changeset: 768832:78a0a7f929f7
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Aug 27 19:25:35 2011 +0000
description:
translate WDOGIOC_GWDOGS
diffstat:
sys/compat/netbsd32/netbsd32_ioctl.c | 24 ++++++++++++++++++++++--
sys/compat/netbsd32/netbsd32_ioctl.h | 9 ++++++++-
2 files changed, 30 insertions(+), 3 deletions(-)
diffs (86 lines):
diff -r 34ff3cf58972 -r 78a0a7f929f7 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Sat Aug 27 19:02:29 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Sat Aug 27 19:25:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.56 2011/04/04 18:24:56 ahoka Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.57 2011/08/27 19:25:35 bouyer 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.56 2011/04/04 18:24:56 ahoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.57 2011/08/27 19:25:35 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,6 +51,7 @@
#include <sys/ktrace.h>
#include <sys/kmem.h>
#include <sys/envsys.h>
+#include <sys/wdog.h>
#ifdef __sparc__
#include <dev/sun/fbio.h>
@@ -279,6 +280,14 @@
*p = (u_long)*s32p;
}
+static inline void
+netbsd32_to_wdog_conf(struct netbsd32_wdog_conf *s32p, struct wdog_conf *p, u_long cmd)
+{
+
+ p->wc_names = (char *)NETBSD32PTR64(s32p->wc_names);
+ p->wc_count = s32p->wc_count;
+}
+
/*
* handle ioctl conversions from 64-bit kernel -> netbsd32
*/
@@ -436,6 +445,14 @@
}
static inline void
+netbsd32_from_wdog_conf(struct wdog_conf *p, struct netbsd32_wdog_conf *s32p, u_long cmd)
+{
+
+ NETBSD32PTR32(s32p->wc_names, p->wc_names);
+ s32p->wc_count = p->wc_count;
+}
+
+static inline void
netbsd32_from_u_long(u_long *p, netbsd32_u_long *s32p, u_long cmd)
{
@@ -743,6 +760,9 @@
case ENVSYS_REMOVEPROPS32:
IOCTL_STRUCT_CONV_TO(ENVSYS_REMOVEPROPS, plistref);
+ case WDOGIOC_GWDOGS32:
+ IOCTL_STRUCT_CONV_TO(WDOGIOC_GWDOGS, wdog_conf);
+
default:
#ifdef NETBSD32_MD_IOCTL
error = netbsd32_md_ioctl(fp, com, data32, l);
diff -r 34ff3cf58972 -r 78a0a7f929f7 sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h Sat Aug 27 19:02:29 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h Sat Aug 27 19:25:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.h,v 1.35 2011/04/04 18:24:56 ahoka Exp $ */
+/* $NetBSD: netbsd32_ioctl.h,v 1.36 2011/08/27 19:25:35 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -392,3 +392,10 @@
#define ENVSYS_GETDICTIONARY32 _IOWR('E', 0, struct netbsd32_plistref)
#define ENVSYS_SETDICTIONARY32 _IOWR('E', 1, struct netbsd32_plistref)
#define ENVSYS_REMOVEPROPS32 _IOWR('E', 2, struct netbsd32_plistref)
+
+/* from <sys/wdog.h> */
+struct netbsd32_wdog_conf {
+ netbsd32_charp wc_names;
+ int wc_count;
+};
+#define WDOGIOC_GWDOGS32 _IOWR('w', 5, struct netbsd32_wdog_conf)
Home |
Main Index |
Thread Index |
Old Index