[libdvdcss-devel] [PATCH 44/47] Drop support for BeOS.
Diego Biurrun
diego at biurrun.de
Wed Oct 29 21:33:44 CET 2014
BeOS is a proprietary legacy OS with no real-world usage.
---
NEWS | 2 +-
configure.ac | 2 +-
libdvdcss.spec.in | 8 +--
src/ioctl.c | 157 +-----------------------------------------------------
src/ioctl.h | 9 +---
src/libdvdcss.c | 4 +-
test/dvd_region.c | 10 ----
7 files changed, 11 insertions(+), 181 deletions(-)
diff --git a/NEWS b/NEWS
index 8eafbae..bf3e1a0 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 and Windows 9x.
+ * Drop support for HP-UX, BeOS, and Windows 9x.
* Miscellaneous cleanups to code, documentation, build system.
diff --git a/configure.ac b/configure.ac
index f4fa527..8d3d6c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,7 +138,7 @@ AC_CHECK_HEADERS(windows.h,[
])
])
-dnl for Un*x and BeOS
+dnl for Un*x
AC_CHECK_HEADERS(sys/ioctl.h,[
CAN_BUILD_LIBDVDCSS=1
AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h)
diff --git a/libdvdcss.spec.in b/libdvdcss.spec.in
index 424f50e..f6ae407 100644
--- a/libdvdcss.spec.in
+++ b/libdvdcss.spec.in
@@ -32,8 +32,8 @@ 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, BeOS, Mac OS X, Solaris, QNX, OS/2, and Windows NT 4.0 (with IE
- 5.0) or later.
+ OpenBSD, Mac OS X, Solaris, QNX, 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 +49,8 @@ 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, BeOS, Mac OS X, Solaris, QNX, OS/2, and Windows NT 4.0 (with IE
- 5.0) or later.
+ OpenBSD, Mac OS X, Solaris, QNX, 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 19b5a18..6c6e910 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -3,8 +3,7 @@
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
*
- * Authors: Markus Kuespert <ltlBeBoy at beosmail.com>
- * Sam Hocevar <sam at zoy.org>
+ * Authors: Sam Hocevar <sam at zoy.org>
* Jon Lech Johansen <jon-vl at nanocrew.net>
* Håkan Hjort <d95hjort at dtek.chalmers.se>
* Eugenio Jarosiewicz <ej0 at cise.ufl.edu>
@@ -64,10 +63,6 @@
#ifdef DVD_STRUCT_IN_DVD_H
# include <dvd.h>
#endif
-#ifdef __BEOS__
-# include <malloc.h>
-# include <scsi.h>
-#endif
#ifdef SOLARIS_USCSI
# include <dlfcn.h>
# include <unistd.h>
@@ -90,10 +85,7 @@
/*****************************************************************************
* Local prototypes, OS specific
*****************************************************************************/
-#if defined( __BEOS__ )
-static void BeInitRDC ( raw_device_command *, int );
-#endif
-#elif defined( SOLARIS_USCSI )
+#if defined( SOLARIS_USCSI )
static void SolarisInitUSCSI( struct uscsi_cmd *p_sc, int i_type );
static int SolarisSendUSCSI( int fd, struct uscsi_cmd *p_sc );
#elif defined( WIN32 )
@@ -131,16 +123,6 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
*pi_copyright = dvd.cpst;
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_READ_DVD_STRUCTURE, 8 );
-
- rdc.command[ 6 ] = i_layer;
- rdc.command[ 7 ] = DVD_STRUCT_COPYRIGHT;
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- *pi_copyright = p_buffer[ 4 ];
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_READ_DVD_STRUCTURE, 8 );
@@ -252,21 +234,6 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key )
memcpy( p_key, dvd.data, DVD_DISCKEY_SIZE );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
-
- rdc.command[ 7 ] = DVD_STRUCT_DISCKEY;
- rdc.command[ 10 ] = *pi_agid << 6;
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- if( i_ret < 0 )
- {
- return i_ret;
- }
-
- memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
@@ -377,19 +344,6 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key )
memcpy( p_key, auth_info.keychal, DVD_KEY_SIZE );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 12 );
-
- rdc.command[ 2 ] = ( i_pos >> 24 ) & 0xff;
- rdc.command[ 3 ] = ( i_pos >> 16 ) & 0xff;
- rdc.command[ 4 ] = ( i_pos >> 8 ) & 0xff;
- rdc.command[ 5 ] = ( i_pos ) & 0xff;
- rdc.command[ 10 ] = DVD_REPORT_TITLE_KEY | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 12 );
@@ -507,15 +461,6 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*pi_agid = auth_info.agid;
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 8 );
-
- rdc.command[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- *pi_agid = p_buffer[ 7 ] >> 6;
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 8 );
@@ -605,15 +550,6 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
memcpy( p_challenge, auth_info.keychal, DVD_CHALLENGE_SIZE );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 16 );
-
- rdc.command[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 16 );
@@ -713,15 +649,6 @@ int ioctl_ReportASF( int i_fd, int *pi_asf )
*pi_asf = auth_info.asf;
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 8 );
-
- rdc.command[ 10 ] = DVD_REPORT_ASF;
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- *pi_asf = p_buffer[ 7 ] & 1;
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 8 );
@@ -823,15 +750,6 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key )
memcpy( p_key, auth_info.keychal, DVD_KEY_SIZE );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 12 );
-
- rdc.command[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 12 );
@@ -922,13 +840,6 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
i_ret = ioctl( i_fd, DVDIOCREPORTKEY, &auth_info );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 0 );
-
- rdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 0 );
@@ -1009,16 +920,6 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_SEND_KEY, 16 );
-
- rdc.command[ 10 ] = DVD_SEND_CHALLENGE | (*pi_agid << 6);
-
- p_buffer[ 1 ] = 0xe;
- memcpy( p_buffer + 4, p_challenge, DVD_CHALLENGE_SIZE );
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_SEND_KEY, 16 );
@@ -1118,16 +1019,6 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key )
i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_SEND_KEY, 12 );
-
- rdc.command[ 10 ] = DVD_SEND_KEY2 | (*pi_agid << 6);
-
- p_buffer[ 1 ] = 0xa;
- memcpy( p_buffer + 4, p_key, DVD_KEY_SIZE );
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_SEND_KEY, 12 );
@@ -1233,17 +1124,6 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
*p_mask = auth_info.region; // ??
*p_scheme = auth_info.rpc_scheme;
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_REPORT_KEY, 8 );
-
- rdc.command[ 10 ] = DVD_REPORT_RPC;
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
- *p_type = p_buffer[ 4 ] >> 6;
- *p_mask = p_buffer[ 5 ];
- *p_scheme = p_buffer[ 6 ];
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 8 );
@@ -1329,39 +1209,6 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
/* Local prototypes */
-#if defined( __BEOS__ )
-/*****************************************************************************
- * BeInitRDC: initialize a RDC structure for the BeOS kernel
- *****************************************************************************
- * This function initializes a BeOS raw device command structure for future
- * use, either a read command or a write command.
- *****************************************************************************/
-static void BeInitRDC( raw_device_command *p_rdc, int i_type )
-{
- memset( p_rdc->data, 0, p_rdc->data_length );
-
- switch( i_type )
- {
- case GPCMD_SEND_KEY:
- /* leave the flags to 0 */
- break;
-
- case GPCMD_READ_DVD_STRUCTURE: case GPCMD_REPORT_KEY:
- p_rdc->flags = B_RAW_DEVICE_DATA_IN; break; }
-
- p_rdc->command[ 0 ] = i_type;
-
- p_rdc->command[ 8 ] = (p_rdc->data_length >> 8) & 0xff;
- p_rdc->command[ 9 ] = p_rdc->data_length & 0xff;
- p_rdc->command_length = 12;
-
- p_rdc->sense_data = NULL;
- p_rdc->sense_data_length = 0;
-
- p_rdc->timeout = 1000000;
-}
-#endif
-
#if defined( SOLARIS_USCSI )
/*****************************************************************************
* SolarisInitUSCSI: initialize a USCSICMD structure for the Solaris kernel
diff --git a/src/ioctl.h b/src/ioctl.h
index 501a69b..4c10971 100644
--- a/src/ioctl.h
+++ b/src/ioctl.h
@@ -44,14 +44,7 @@ int ioctl_ReportRPC ( int, int *, int *, int * );
/*****************************************************************************
* Common macros, OS specific
*****************************************************************************/
-#if defined( __BEOS__ )
-#define INIT_RDC( TYPE, SIZE ) \
- raw_device_command rdc = { 0 }; \
- uint8_t p_buffer[ (SIZE)+1 ]; \
- rdc.data = (char *)p_buffer; \
- rdc.data_length = (SIZE); \
- BeInitRDC( &rdc, (TYPE) );
-#elif defined( SOLARIS_USCSI )
+#if defined( SOLARIS_USCSI )
#define INIT_USCSI( TYPE, SIZE ) \
struct uscsi_cmd sc = { 0 }; \
union scsi_cdb rs_cdb; \
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 8acfbb1..5ab171e 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, BeOS, Mac OS X, Solaris, QNX, OS/2, and Windows
- * NT 4.0 (with IE 5.0) or later.
+ * NetBSD, OpenBSD, Mac OS X, Solaris, QNX, 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 3cbfe3f..d38eeb7 100644
--- a/test/dvd_region.c
+++ b/test/dvd_region.c
@@ -57,16 +57,6 @@ static int ioctl_SendRPC( int i_fd, int i_pdrc )
i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info );
-#elif defined( __BEOS__ )
- INIT_RDC( GPCMD_SEND_KEY, 8 );
-
- rdc.command[ 10 ] = DVD_SEND_RPC;
-
- p_buffer[ 1 ] = 6;
- p_buffer[ 4 ] = i_pdrc;
-
- i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_SEND_KEY, 8 );
--
1.9.1
More information about the libdvdcss-devel
mailing list