Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Add defines for 'passthrough' (PTIOC) ioctl commands...



details:   https://anonhg.NetBSD.org/src/rev/cdc9fa94bcc4
branches:  trunk
changeset: 500768:cdc9fa94bcc4
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon Dec 18 14:43:43 2000 +0000

description:
Add defines for 'passthrough' (PTIOC) ioctl commands. To be used for
devices that use private sets of ioctls (in LKMs), which should not
conflict with other defines. Define a value for each emulation, so
that, for example, Linux binaries which have specific ioctls
redefined to passthrough ones by the compat code, don't conflict
with other emulations.

diffstat:

 sys/sys/ioctl.h |  24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r a7009026d3ff -r cdc9fa94bcc4 sys/sys/ioctl.h
--- a/sys/sys/ioctl.h   Mon Dec 18 14:40:02 2000 +0000
+++ b/sys/sys/ioctl.h   Mon Dec 18 14:43:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioctl.h,v 1.25 1999/04/30 05:29:20 cgd Exp $   */
+/*     $NetBSD: ioctl.h,v 1.26 2000/12/18 14:43:43 fvdl Exp $  */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -65,6 +65,28 @@
 #include <sys/filio.h>
 #include <sys/sockio.h>
 
+/*
+ * Passthrough ioctl commands. These are passed through to devices
+ * as they are, it is expected that the device (an LKM, for example),
+ * will know how to deal with them. One for each emulation, so that
+ * no namespace clashes will occur between them, for devices that
+ * may be dealing with specific ioctls for multiple emulations.
+ */
+
+struct ioctl_pt {
+       unsigned long com;
+       caddr_t data;
+};
+
+#define PTIOCNETBSD    _IOW('Z', 0, struct ioctl_pt)
+#define PTIOCSUNOS     _IOW('Z', 1, struct ioctl_pt)
+#define PTIOCSVR4      _IOW('Z', 2, struct ioctl_pt)
+#define PTIOCLINUX     _IOW('Z', 3, struct ioctl_pt)
+#define PTIOCFREEBSD   _IOW('Z', 4, struct ioctl_pt)
+#define PTIOCOSF1      _IOW('Z', 5, struct ioctl_pt)
+#define PTIOCULTRIX    _IOW('Z', 6, struct ioctl_pt)
+#define PTIOCWIN32     _IOW('Z', 7, struct ioctl_pt)
+
 #ifndef _KERNEL
 
 #include <sys/cdefs.h>



Home | Main Index | Thread Index | Old Index