Subject: kern/2143: subchannel-q data format is missing.
To: None <gnats-bugs@NetBSD.ORG>
From: Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp>
List: netbsd-bugs
Date: 02/28/1996 15:21:27
>Number:         2143
>Category:       kern
>Synopsis:       subchannel-q data format is missing.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 28 05:35:03 1996
>Last-Modified:
>Originator:     Masanobu Saitoh
>Organization:
University of Electro-Communications (Japan)
>Release:        latest -current
>Environment:
System: NetBSD vfault.spa.is.uec.ac.jp 1.1A NetBSD 1.1A (VFAULT) #14: Thu Feb 8 05:01:07 JST 1996 msaitoh@vfault.spa.is.uec.ac.jp:/export/vfault/vfaultsrc/src/sys/arch/i386/compile/VFAULT i386


>Description:
	CDIOCREADSUBCHANNEL returns 4 types data.
	But struct cd_sub_channel_info has no "subchannel-q data."
	Current cdio.h has 3 types format only.

>How-To-Repeat:
>Fix:
	This patch is a part of "kern/2091" bug report.

------------------------------- cut here ------------------------------------
*** /usr/include/sys/cdio.h	Tue Feb 20 21:41:23 1996
--- cdio.h	Thu Aug  3 08:13:34 1995
***************
*** 32,37 ****
--- 32,71 ----
  	u_char	data_len[2];
  };
  
+ struct cd_sub_channel_q_data {
+ 	u_char	data_format;
+ #if BYTE_ORDER == LITTLE_ENDIAN
+ 	u_char	control:4;
+ 	u_char	addr_type:4;
+ #endif
+ #if BYTE_ORDER == BIG_ENDIAN
+ 	u_char	addr_type:4;
+ 	u_char	control:4;
+ #endif
+ 	u_char	track_number;
+ 	u_char	index_number;
+ 	u_char	absaddr[4];
+ 	u_char	reladdr[4];
+ #if BYTE_ORDER == LITTLE_ENDIAN
+         u_char  :7;
+         u_char  mc_valid:1;
+ #endif
+ #if BYTE_ORDER == BIG_ENDIAN
+         u_char  mc_valid:1;
+         u_char  :7;
+ #endif
+         u_char  mc_number[15]; 
+ #if BYTE_ORDER == LITTLE_ENDIAN
+         u_char  :7;
+         u_char  ti_valid:1;   
+ #endif
+ #if BYTE_ORDER == BIG_ENDIAN
+         u_char  ti_valid:1;   
+         u_char  :7;
+ #endif
+         u_char  ti_number[15]; 
+ };
+ 
  struct cd_sub_channel_position_data {
  	u_char	data_format;
  #if BYTE_ORDER == LITTLE_ENDIAN
***************
*** 83,88 ****
--- 117,123 ----
  struct cd_sub_channel_info {
  	struct cd_sub_channel_header header;
  	union {
+ 		struct cd_sub_channel_q_data q_data;
  		struct cd_sub_channel_position_data position;
  		struct cd_sub_channel_media_catalog media_catalog;
  		struct cd_sub_channel_track_info track_info;
------------------------------- cut here ------------------------------------
>Audit-Trail:
>Unformatted: