Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/compat/linux/common Pull up revision 1.5 (requested...



details:   https://anonhg.NetBSD.org/src/rev/a1df61b32029
branches:  netbsd-1-5
changeset: 490988:a1df61b32029
user:      he <he%NetBSD.org@localhost>
date:      Fri Mar 30 21:38:32 2001 +0000

description:
Pull up revision 1.5 (requested by fvdl):
  Add some required Linux emulation bits to support the Linux
  version of VMware.

diffstat:

 sys/compat/linux/common/linux_cdrom.h |  64 ++++++++++++++++++++++++++++++++++-
 1 files changed, 63 insertions(+), 1 deletions(-)

diffs (93 lines):

diff -r 82895588b7a4 -r a1df61b32029 sys/compat/linux/common/linux_cdrom.h
--- a/sys/compat/linux/common/linux_cdrom.h     Fri Mar 30 21:37:59 2001 +0000
+++ b/sys/compat/linux/common/linux_cdrom.h     Fri Mar 30 21:38:32 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_cdrom.h,v 1.4 1999/10/29 15:02:56 mycroft Exp $  */
+/*     $NetBSD: linux_cdrom.h,v 1.4.6.1 2001/03/30 21:38:32 he Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -39,6 +39,8 @@
 #ifndef _LINUX_CDROM_H
 #define _LINUX_CDROM_H
 
+#include <machine/endian.h>
+
 #define LINUX_CDROMPAUSE       0x5301
 #define LINUX_CDROMRESUME      0x5302
 #define LINUX_CDROMPLAYMSF     0x5303  /* (struct linux_cdrom_msf) */
@@ -51,9 +53,22 @@
 #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_CDROMMULTISESSION        0x5310  /* (struct linux_cdrom_multisession) */
 #define LINUX_CDROMRESET       0x5312
 #define LINUX_CDROMVOLREAD     0x5313  /* (struct linux_cdrom_volctrl) */
 #define LINUX_CDROMPLAYBLK     0x5317  /* (struct linux_cdrom_blk) */
+#define LINUX_CDROMCLOSETRAY   0x5319  /* */
+#define LINUX_CDROM_SET_OPTIONS        0x5320  /* int */
+#define LINUX_CDROM_CLEAR_OPTIONS      0x5321  /* int */
+#define LINUX_CDROM_SELECT_SPEED       0x5322
+#define LINUX_CDROM_SELECT_DISC                0x5323
+#define LINUX_CDROM_MEDIA_CHANGED      0x5325
+#define LINUX_CDROM_DRIVE_STATUS       0x5326
+#define LINUX_CDROM_DISC_STATUS                0x5327
+#define LINUX_CDROM_CHANGER_NSLOTS     0x5328
+#define LINUX_CDROM_LOCKDOOR           0x5329
+#define LINUX_CDROM_DEBUG              0x5330
+#define LINUX_CDROM_GET_CAPABILITY     0x5331
 
 /* DVD-ROM Specific ioctls */              
 #define        LINUX_DVD_READ_STRUCT   0x5390  /* Read structure */
@@ -124,4 +139,51 @@
        u_char  channel3;
 };
 
+struct linux_cdrom_multisession {
+       union linux_cdrom_addr addr;
+       u_char xa_flag;
+       u_char addr_format;
+};
+
+struct linux_cdrom_mechstat_header {
+#if BYTE_ORDER == BIG_ENDIAN
+       u_int8_t fault          : 1;
+       u_int8_t changer_state  : 2;
+       u_int8_t curslot        : 5;
+       u_int8_t mech_state     : 3;
+       u_int8_t door_open      : 1;
+       u_int8_t reserved1      : 4;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+       u_int8_t curslot        : 5;
+       u_int8_t changer_state  : 2;
+       u_int8_t fault          : 1;
+       u_int8_t reserved1      : 4;
+       u_int8_t door_open      : 1;
+       u_int8_t mech_state     : 3;
+#endif
+       u_int8_t curlba[3];
+       u_int8_t nslots;
+       u_int16_t slot_tablelen;
+};
+
+struct linux_cdrom_slot {
+#if BYTE_ORDER == BIG_ENDIAN
+       u_int8_t disc_present   : 1;
+       u_int8_t reserved1      : 6;
+       u_int8_t change         : 1;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+       u_int8_t change         : 1;
+       u_int8_t reserved1      : 6;
+       u_int8_t disc_present   : 1;
+#endif
+       u_int8_t reserved2[3];
+};
+
+#define LINUX_CDROM_MAX_SLOTS   256
+
+struct linux_cdrom_changer_info {
+       struct linux_cdrom_mechstat_header hdr;
+       struct linux_cdrom_slot slots[LINUX_CDROM_MAX_SLOTS];
+};
+
 #endif /* !_LINUX_CDROM_H */



Home | Main Index | Thread Index | Old Index