summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2009-09-21 07:41:19 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2009-09-21 07:41:19 +0000
commitad745cbbe81832c6a87c8f955dd968cd1988b1e3 (patch)
tree12cffc5bcf426180906b3cac08e7b0815c729bf3 /sys/dev
parentbbc2bb8fcbd05be09c44c833dc486fea07cc8450 (diff)
Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from udl.h to udlio.h so we can include it in userland applications. Suggested and OK miod@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/udl.c3
-rw-r--r--sys/dev/usb/udl.h16
-rw-r--r--sys/dev/usb/udlio.h31
-rw-r--r--sys/dev/wscons/wsconsio.h5
4 files changed, 37 insertions, 18 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index d26edf13fbe..799a382906f 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.49 2009/09/20 11:24:02 mglocker Exp $ */
+/* $OpenBSD: udl.c,v 1.50 2009/09/21 07:41:18 mglocker Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -45,6 +45,7 @@
#include <dev/rasops/rasops.h>
#include <dev/usb/udl.h>
+#include <dev/usb/udlio.h>
/*
* Defines.
diff --git a/sys/dev/usb/udl.h b/sys/dev/usb/udl.h
index cd4c66e4be9..c67d5980a40 100644
--- a/sys/dev/usb/udl.h
+++ b/sys/dev/usb/udl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.h,v 1.12 2009/09/20 10:18:20 mglocker Exp $ */
+/* $OpenBSD: udl.h,v 1.13 2009/09/21 07:41:18 mglocker Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -103,20 +103,6 @@ struct udl_softc {
};
/*
- * udl IOCTLs.
- */
-struct udl_ioctl_damage {
- int x1;
- int x2;
- int y1;
- int y2;
-#define UDLIO_STATUS_OK 0
-#define UDLIO_STATUS_FAILED 1
- int status;
-};
-#define UDLIO_DAMAGE _IOWR('W', 0, struct udl_ioctl_damage)
-
-/*
* Chip commands.
*/
#define UDL_CTRL_CMD_READ_EDID 0x02
diff --git a/sys/dev/usb/udlio.h b/sys/dev/usb/udlio.h
new file mode 100644
index 00000000000..5cfbc5f12e0
--- /dev/null
+++ b/sys/dev/usb/udlio.h
@@ -0,0 +1,31 @@
+/* $OpenBSD: udlio.h,v 1.1 2009/09/21 07:41:18 mglocker Exp $ */
+
+/*
+ * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * udl IOCTLs.
+ */
+struct udl_ioctl_damage {
+ int x1;
+ int x2;
+ int y1;
+ int y2;
+#define UDLIO_STATUS_OK 0
+#define UDLIO_STATUS_FAILED 1
+ int status;
+};
+#define UDLIO_DAMAGE _IOWR('W', 128, struct udl_ioctl_damage)
diff --git a/sys/dev/wscons/wsconsio.h b/sys/dev/wscons/wsconsio.h
index 3bb2a2ff037..b74f4bc7219 100644
--- a/sys/dev/wscons/wsconsio.h
+++ b/sys/dev/wscons/wsconsio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsconsio.h,v 1.55 2009/07/03 17:37:02 kettenis Exp $ */
+/* $OpenBSD: wsconsio.h,v 1.56 2009/09/21 07:41:18 mglocker Exp $ */
/* $NetBSD: wsconsio.h,v 1.74 2005/04/28 07:15:44 martin Exp $ */
/*
@@ -42,7 +42,8 @@
* 32-63 mouse ioctls (WSMOUSEIO)
* 64-95 display ioctls (WSDISPLAYIO)
* 96-127 mux ioctls (WSMUXIO)
- * 128-255 reserved for future use
+ * 128-159 driver private ioctls
+ * 160-255 reserved for future use
*/
#include <sys/types.h>