summaryrefslogtreecommitdiff
path: root/sys/compat/linux/include/linux_cdrom.h
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1998-01-15 14:52:11 +0000
committerchristos <christos@NetBSD.org>1998-01-15 14:52:11 +0000
commit05d3f8a2e913830059a6b376f8e4e4c886357cb5 (patch)
treec902bbaa7adf527b3115c6dab642a0841674577b /sys/compat/linux/include/linux_cdrom.h
parentdc8f78518792613b091a51d1f37562ad42aa13af (diff)
PR/4794: Urban Boquist: Linux cdrom ioctls are missing
Diffstat (limited to 'sys/compat/linux/include/linux_cdrom.h')
-rw-r--r--sys/compat/linux/include/linux_cdrom.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/sys/compat/linux/include/linux_cdrom.h b/sys/compat/linux/include/linux_cdrom.h
new file mode 100644
index 00000000000..cd10bf2491a
--- /dev/null
+++ b/sys/compat/linux/include/linux_cdrom.h
@@ -0,0 +1,114 @@
+/* $NetBSD: linux_cdrom.h,v 1.1 1998/01/15 14:52:12 christos Exp $ */
+
+/*
+ * Copyright (c) 1997 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define LINUX_CDROMPAUSE 0x5301
+#define LINUX_CDROMRESUME 0x5302
+#define LINUX_CDROMPLAYMSF 0x5303 /* (struct linux_cdrom_msf) */
+#define LINUX_CDROMPLAYTRKIND 0x5304 /* (struct linux_cdrom_ti) */
+#define LINUX_CDROMREADTOCHDR 0x5305 /* (struct linux_cdrom_tochdr) */
+#define LINUX_CDROMREADTOCENTRY 0x5306 /* (struct linux_cdrom_tocentry) */
+#define LINUX_CDROMSTOP 0x5307
+#define LINUX_CDROMSTART 0x5308
+#define LINUX_CDROMEJECT 0x5309
+#define LINUX_CDROMVOLCTRL 0x530a /* (struct linux_cdrom_volctrl) */
+#define LINUX_CDROMSUBCHNL 0x530b /* (struct linux_cdrom_subchnl) */
+#define LINUX_CDROMEJECT_SW 0x530f /* arg: 0 or 1 */
+#define LINUX_CDROMRESET 0x5312
+#define LINUX_CDROMVOLREAD 0x5313 /* (struct linux_cdrom_volctrl) */
+#define LINUX_CDROMPLAYBLK 0x5317 /* (struct linux_cdrom_blk) */
+
+struct linux_cdrom_blk {
+ unsigned from;
+ unsigned short len;
+};
+
+struct linux_cdrom_msf {
+ u_char cdmsf_min0; /* start minute */
+ u_char cdmsf_sec0; /* start second */
+ u_char cdmsf_frame0; /* start frame */
+ u_char cdmsf_min1; /* end minute */
+ u_char cdmsf_sec1; /* end second */
+ u_char cdmsf_frame1; /* end frame */
+};
+
+struct linux_cdrom_ti {
+ u_char cdti_trk0; /* start track */
+ u_char cdti_ind0; /* start index */
+ u_char cdti_trk1; /* end track */
+ u_char cdti_ind1; /* end index */
+};
+
+struct linux_cdrom_tochdr {
+ u_char cdth_trk0; /* start track */
+ u_char cdth_trk1; /* end track */
+};
+
+struct linux_cdrom_msf0 {
+ u_char minute;
+ u_char second;
+ u_char frame;
+};
+
+union linux_cdrom_addr {
+ struct linux_cdrom_msf0 msf;
+ int lba;
+};
+
+struct linux_cdrom_tocentry {
+ u_char cdte_track;
+ u_char cdte_adr :4;
+ u_char cdte_ctrl :4;
+ u_char cdte_format;
+ union linux_cdrom_addr cdte_addr;
+ u_char cdte_datamode;
+};
+
+struct linux_cdrom_subchnl {
+ u_char cdsc_format;
+ u_char cdsc_audiostatus;
+ u_char cdsc_adr: 4;
+ u_char cdsc_ctrl: 4;
+ u_char cdsc_trk;
+ u_char cdsc_ind;
+ union linux_cdrom_addr cdsc_absaddr;
+ union linux_cdrom_addr cdsc_reladdr;
+};
+
+struct linux_cdrom_volctrl {
+ u_char channel0;
+ u_char channel1;
+ u_char channel2;
+ u_char channel3;
+};