[libdvdcss-devel] [PATCH 45/47] Drop support for QNX.
Diego Biurrun
diego at biurrun.de
Wed Oct 29 21:33:45 CET 2014
---
NEWS | 2 +-
libdvdcss.spec.in | 6 +--
src/ioctl.c | 155 ------------------------------------------------------
src/ioctl.h | 10 ----
src/libdvdcss.c | 4 +-
test/dvd_region.c | 11 ----
6 files changed, 5 insertions(+), 183 deletions(-)
diff --git a/NEWS b/NEWS
index bf3e1a0..f7f905c 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@ Changes between 1.2.13 and 1.3.0:
- the type dvdcss_handle
- the variable dvdcss_interface_2
* Support for Android
- * Drop support for HP-UX, BeOS, and Windows 9x.
+ * Drop support for HP-UX, BeOS, QNX, and Windows 9x.
* Miscellaneous cleanups to code, documentation, build system.
diff --git a/libdvdcss.spec.in b/libdvdcss.spec.in
index f6ae407..67994a5 100644
--- a/libdvdcss.spec.in
+++ b/libdvdcss.spec.in
@@ -32,8 +32,7 @@ Conflicts: libdvdcss0.0.1, libdvdcss0.0.2
libdvdcss is a simple library designed for accessing DVDs like a block device
without having to bother about the decryption. The important features are:
* Portability: Currently supported platforms are GNU/Linux, FreeBSD, NetBSD,
- OpenBSD, Mac OS X, Solaris, QNX, OS/2, and Windows NT 4.0 (with IE 5.0)
- or later.
+ OpenBSD, Mac OS X, Solaris, OS/2, and Windows NT 4.0 (with IE 5.0) or later.
* Adaptability: Unlike most similar projects, libdvdcss does not require the
region of your drive to be set and will try its best to read from the disc
even in the case of a region mismatch.
@@ -49,8 +48,7 @@ Provides: %name = %version-%release
libdvdcss is a simple library designed for accessing DVDs like a block device
without having to bother about the decryption. The important features are:
* Portability: Currently supported platforms are GNU/Linux, FreeBSD, NetBSD,
- OpenBSD, Mac OS X, Solaris, QNX, OS/2, and Windows NT 4.0 (with IE 5.0)
- or later.
+ OpenBSD, Mac OS X, Solaris, OS/2, and Windows NT 4.0 (with IE 5.0) or later.
* Adaptability: Unlike most similar projects, libdvdcss does not require the
region of your drive to be set and will try its best to read from the disc
even in the case of a region mismatch.
diff --git a/src/ioctl.c b/src/ioctl.c
index 6c6e910..dee2c86 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -73,10 +73,6 @@
#ifdef DARWIN_DVD_IOCTL
# include <IOKit/storage/IODVDMediaBSDClient.h>
#endif
-#ifdef __QNXNTO__
-# include <sys/mman.h>
-# include <sys/dcmd_cam.h>
-#endif
#include "dvdcss/dvdcss.h"
#include "common.h"
@@ -90,8 +86,6 @@ static void SolarisInitUSCSI( struct uscsi_cmd *p_sc, int i_type );
static int SolarisSendUSCSI( int fd, struct uscsi_cmd *p_sc );
#elif defined( WIN32 )
static void WinInitSPTD ( SCSI_PASS_THROUGH_DIRECT *, int );
-#elif defined( __QNXNTO__ )
-static void QNXInitCPT ( CAM_PASS_THRU *, int );
#elif defined( __OS2__ )
static void OS2InitSDC( struct OS2_ExecSCSICmd *, int );
#endif
@@ -167,17 +161,6 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
*pi_copyright = p_buffer[ 4 ];
}
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_READ_DVD_STRUCTURE, 8 );
-
- p_cpt->cam_cdb[ 6 ] = i_layer;
- p_cpt->cam_cdb[ 7 ] = DVD_STRUCT_COPYRIGHT;
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- *pi_copyright = p_buffer[4];
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_READ_DVD_STRUCTURE, 8 );
@@ -280,17 +263,6 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key )
memcpy( p_key, key->KeyData, DVD_DISCKEY_SIZE );
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
-
- p_cpt->cam_cdb[ 7 ] = DVD_STRUCT_DISCKEY;
- p_cpt->cam_cdb[ 10 ] = *pi_agid << 6;
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE );
-
#elif defined ( __OS2__ )
INIT_SSC( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
@@ -396,20 +368,6 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key )
memcpy( p_key, key->KeyData, DVD_KEY_SIZE );
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 12 );
-
- p_cpt->cam_cdb[ 2 ] = ( i_pos >> 24 ) & 0xff;
- p_cpt->cam_cdb[ 3 ] = ( i_pos >> 16 ) & 0xff;
- p_cpt->cam_cdb[ 4 ] = ( i_pos >> 8 ) & 0xff;
- p_cpt->cam_cdb[ 5 ] = ( i_pos ) & 0xff;
- p_cpt->cam_cdb[ 10 ] = DVD_REPORT_TITLE_KEY | (*pi_agid << 6);
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 12 );
@@ -495,16 +453,6 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*pi_agid = id;
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 8 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6);
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- *pi_agid = p_buffer[ 7 ] >> 6;
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 8 );
@@ -594,16 +542,6 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
memcpy( p_challenge, key->KeyData, DVD_CHALLENGE_SIZE );
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 16 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6);
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 16 );
@@ -695,16 +633,6 @@ int ioctl_ReportASF( int i_fd, int *pi_asf )
keyData = (PDVD_ASF)key->KeyData;
*pi_asf = keyData->SuccessFlag;
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 8 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_REPORT_ASF;
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- *pi_asf = p_buffer[ 7 ] & 1;
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 8 );
@@ -789,16 +717,6 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key )
memcpy( p_key, key->KeyData, DVD_KEY_SIZE );
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 12 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6);
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 12 );
@@ -866,14 +784,6 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_END_SESSION,
pi_agid, sizeof( *pi_agid ), NULL, 0, &tmp, NULL ) ? 0 : -1;
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 0 );
-
- p_cpt->cam_cdb[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 1 );
@@ -962,17 +872,6 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key,
key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1;
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_SEND_KEY, 16 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_SEND_CHALLENGE | (*pi_agid << 6);
-
- p_buffer[ 1 ] = 0xe;
- memcpy( p_buffer + 4, p_challenge, DVD_CHALLENGE_SIZE );
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_SEND_KEY, 16 );
@@ -1061,17 +960,6 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key )
i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key,
key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1;
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_SEND_KEY, 12 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_SEND_KEY2 | (*pi_agid << 6);
-
- p_buffer[ 1 ] = 0xa;
- memcpy( p_buffer + 4, p_key, DVD_KEY_SIZE );
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_SEND_KEY, 12 );
@@ -1175,18 +1063,6 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
*p_mask = keyData->RegionMask;
*p_scheme = keyData->RpcScheme;
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_REPORT_KEY, 8 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_REPORT_RPC;
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
- *p_type = p_buffer[ 4 ] >> 6;
- *p_mask = p_buffer[ 5 ];
- *p_scheme = p_buffer[ 6 ];
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_REPORT_KEY, 8 );
@@ -1341,37 +1217,6 @@ static void WinInitSPTD( SCSI_PASS_THROUGH_DIRECT *p_sptd, int i_type )
}
#endif /* defined( WIN32 ) */
-#if defined( __QNXNTO__ )
-/*****************************************************************************
- * QNXInitCPT: initialize a CPT structure for QNX Neutrino
- *****************************************************************************
- * This function initializes a cpt command structure for future use,
- * either a read command or a write command.
- *****************************************************************************/
-static void QNXInitCPT( CAM_PASS_THRU * p_cpt, int i_type )
-{
- switch( i_type )
- {
- case GPCMD_SEND_KEY:
- p_cpt->cam_flags = CAM_DIR_OUT;
- break;
-
- case GPCMD_READ_DVD_STRUCTURE:
- case GPCMD_REPORT_KEY:
- p_cpt->cam_flags = CAM_DIR_IN;
- break;
- }
-
- p_cpt->cam_cdb[0] = i_type;
-
- p_cpt->cam_cdb[ 8 ] = (p_cpt->cam_dxfer_len >> 8) & 0xff;
- p_cpt->cam_cdb[ 9 ] = p_cpt->cam_dxfer_len & 0xff;
- p_cpt->cam_cdb_len = 12;
-
- p_cpt->cam_timeout = CAM_TIME_DEFAULT;
-}
-#endif /* defined( __QNXNTO__ ) */
-
#if defined( __OS2__ )
/*****************************************************************************
* OS2InitSDC: initialize a SDC structure for the Execute SCSI-command
diff --git a/src/ioctl.h b/src/ioctl.h
index 4c10971..f7c3067 100644
--- a/src/ioctl.h
+++ b/src/ioctl.h
@@ -74,16 +74,6 @@ int ioctl_ReportRPC ( int, int *, int *, int * );
(SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \
(SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \
(TMP), NULL ) ? 0 : -1)
-#elif defined( __QNXNTO__ )
-#define INIT_CPT( TYPE, SIZE ) \
- CAM_PASS_THRU * p_cpt = { 0 }; \
- uint8_t * p_buffer; \
- int structSize = sizeof( CAM_PASS_THRU ) + (SIZE); \
- p_cpt = (CAM_PASS_THRU *) malloc ( structSize ); \
- p_buffer = (uint8_t *) p_cpt + sizeof( CAM_PASS_THRU ); \
- p_cpt->cam_data_ptr = sizeof( CAM_PASS_THRU ); \
- p_cpt->cam_dxfer_len = (SIZE); \
- QNXInitCPT( p_cpt, (TYPE) );
#elif defined( __OS2__ )
#define INIT_SSC( TYPE, SIZE ) \
struct OS2_ExecSCSICmd sdc = { 0 }; \
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 5ab171e..9a10ac9 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -30,8 +30,8 @@
* device without having to bother about the decryption. The important features
* are:
* \li portability: Currently supported platforms are GNU/Linux, FreeBSD,
- * NetBSD, OpenBSD, Mac OS X, Solaris, QNX, OS/2, and Windows NT 4.0
- * (with IE 5.0) or later.
+ * NetBSD, OpenBSD, Mac OS X, Solaris, OS/2, and Windows NT 4.0 (with
+ * IE 5.0) or later.
* \li adaptability: Unlike most similar projects, libdvdcss does not require
* the region of your drive to be set and will try its best to read from
* the disc even in the case of a region mismatch.
diff --git a/test/dvd_region.c b/test/dvd_region.c
index d38eeb7..c4308a3 100644
--- a/test/dvd_region.c
+++ b/test/dvd_region.c
@@ -91,17 +91,6 @@ static int ioctl_SendRPC( int i_fd, int i_pdrc )
i_ret = SEND_SPTD( i_fd, &sptd, &tmp );
-#elif defined( __QNXNTO__ )
-
- INIT_CPT( GPCMD_SEND_KEY, 8 );
-
- p_cpt->cam_cdb[ 10 ] = DVD_SEND_RPC;
-
- p_buffer[ 1 ] = 6;
- p_buffer[ 4 ] = i_pdrc;
-
- i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
-
#elif defined( __OS2__ )
INIT_SSC( GPCMD_SEND_KEY, 8 );
--
1.9.1
More information about the libdvdcss-devel
mailing list