Discussion:
[libdvdcss-devel] [PATCH] [RFC] Remove HP-UX support.
Diego Biurrun
2014-10-20 17:56:51 UTC
Permalink
HP-UX is a legacy proprietary Unix with no real-world usage.
---

I can actually remember HP-UX systems from a university lab and how I
tried them once and immediately went back to the Linux systems in disgust
instead. Can anybody else? :)

The change in AUTHORS may not be appropriate.

AUTHORS | 4 --
configure.ac | 8 ---
libdvdcss.spec.in | 8 +--
msvc/config.h | 1 -
src/ioctl.c | 155 ------------------------------------------------------
src/ioctl.h | 12 -----
src/libdvdcss.c | 2 +-
test/dvd_region.c | 10 ----
8 files changed, 5 insertions(+), 195 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7d3920a..d2d32f2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -71,10 +71,6 @@ N: Steven M. Schultz
E: ***@TO.GD-ES.COM
D: BSD/OS port

-N: David Siebörger
-E: drs-***@rucus.ru.ac.za
-D: HP-UX port of the DVD ioctls
-
N: Alex Strelnikov
E: ***@os2.ru
D: OS/2 port
diff --git a/configure.ac b/configure.ac
index 6d58e96..a07a3e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,14 +181,6 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
AC_DEFINE(SOLARIS_USCSI, 1, Have userspace SCSI headers.)
])
dnl
- dnl HP-UX: sys/scsi.h
- dnl
- AC_CHECK_HEADER(sys/scsi.h,[
- AC_EGREP_HEADER(sctl_io,sys/scsi.h,[
- AC_DEFINE(HPUX_SCTL_IO, 1, Define if <sys/scsi.h> defines sctl_io.)
- ])
- ])
- dnl
dnl Darwin
dnl
AC_CHECK_HEADER(IOKit/storage/IODVDMediaBSDClient.h,[
diff --git a/libdvdcss.spec.in b/libdvdcss.spec.in
index ced4673..29b50de 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, HP-UX, OS/2, Windows 98 SE
- (with IE 5.0) or later, and Windows NT 4.0 (with IE 5.0) or later.
+ OpenBSD, BeOS, Mac OS X, Solaris, OS/2, Windows 98 SE (with IE 5.0) or
+ later, 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, HP-UX, OS/2, Windows 98 SE
- (with IE 5.0) or later, and Windows NT 4.0 (with IE 5.0) or later.
+ OpenBSD, BeOS, Mac OS X, Solaris, OS/2, Windows 98 SE (with IE 5.0) or
+ later, 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/msvc/config.h b/msvc/config.h
index 358f027..dc7fb62 100644
--- a/msvc/config.h
+++ b/msvc/config.h
@@ -27,7 +27,6 @@
#define HAVE_WINDOWS_H 1
#define HAVE_WINIOCTL_H 1
/* #undef HAVE__SYS_DEV_SCSI_SCSI_IOCTL_H */
-/* #undef HPUX_SCTL_IO */
#define PACKAGE "libdvdcss"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "libdvdcss"
diff --git a/src/ioctl.c b/src/ioctl.c
index 7c7534d..81a46c2 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -68,9 +68,6 @@
# include <malloc.h>
# include <scsi.h>
#endif
-#ifdef HPUX_SCTL_IO
-# include <sys/scsi.h>
-#endif
#ifdef SOLARIS_USCSI
# include <dlfcn.h>
# include <unistd.h>
@@ -98,13 +95,6 @@ static void BeInitRDC ( raw_device_command *, int );
#endif

/*****************************************************************************
- * Local prototypes, HP-UX specific
- *****************************************************************************/
-#if defined( HPUX_SCTL_IO )
-static void HPUXInitSCTL ( struct sctl_io *sctl_io, int i_type );
-#endif
-
-/*****************************************************************************
* Local prototypes, Solaris specific
*****************************************************************************/
#if defined( SOLARIS_USCSI )
@@ -172,16 +162,6 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )

*pi_copyright = p_buffer[ 4 ];

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_READ_DVD_STRUCTURE, 8 );
-
- sctl_io.cdb[ 6 ] = i_layer;
- sctl_io.cdb[ 7 ] = DVD_STRUCT_COPYRIGHT;
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- *pi_copyright = p_buffer[ 4 ];
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_READ_DVD_STRUCTURE, 8 );

@@ -322,21 +302,6 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key )

memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
-
- sctl_io.cdb[ 7 ] = DVD_STRUCT_DISCKEY;
- sctl_io.cdb[ 10 ] = *pi_agid << 6;
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- 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 );

@@ -479,19 +444,6 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key )

memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 12 );
-
- sctl_io.cdb[ 2 ] = ( i_pos >> 24 ) & 0xff;
- sctl_io.cdb[ 3 ] = ( i_pos >> 16 ) & 0xff;
- sctl_io.cdb[ 4 ] = ( i_pos >> 8 ) & 0xff;
- sctl_io.cdb[ 5 ] = ( i_pos ) & 0xff;
- sctl_io.cdb[ 10 ] = DVD_REPORT_TITLE_KEY | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 12 );

@@ -635,15 +587,6 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )

*pi_agid = p_buffer[ 7 ] >> 6;

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 8 );
-
- sctl_io.cdb[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- *pi_agid = p_buffer[ 7 ] >> 6;
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 8 );

@@ -755,15 +698,6 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )

memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 16 );
-
- sctl_io.cdb[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 16 );

@@ -885,15 +819,6 @@ int ioctl_ReportASF( int i_fd, int *pi_asf )

*pi_asf = p_buffer[ 7 ] & 1;

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 8 );
-
- sctl_io.cdb[ 10 ] = DVD_REPORT_ASF;
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- *pi_asf = p_buffer[ 7 ] & 1;
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 8 );

@@ -1017,15 +942,6 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key )

memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 12 );
-
- sctl_io.cdb[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 12 );

@@ -1136,13 +1052,6 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )

i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 0 );
-
- sctl_io.cdb[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 0 );

@@ -1252,16 +1161,6 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )

i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_SEND_KEY, 16 );
-
- sctl_io.cdb[ 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, SIOC_IO, &sctl_io );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_SEND_KEY, 16 );

@@ -1385,16 +1284,6 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key )

i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_SEND_KEY, 12 );
-
- sctl_io.cdb[ 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, SIOC_IO, &sctl_io );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_SEND_KEY, 12 );

@@ -1525,17 +1414,6 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
*p_mask = p_buffer[ 5 ];
*p_scheme = p_buffer[ 6 ];

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_REPORT_KEY, 8 );
-
- sctl_io.cdb[ 10 ] = DVD_REPORT_RPC;
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
- *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 );

@@ -1669,39 +1547,6 @@ static void BeInitRDC( raw_device_command *p_rdc, int i_type )
}
#endif

-#if defined( HPUX_SCTL_IO )
-/*****************************************************************************
- * HPUXInitSCTL: initialize a sctl_io structure for the HP-UX kernel
- *****************************************************************************
- * This function initializes a HP-UX command structure for future
- * use, either a read command or a write command.
- *****************************************************************************/
-static void HPUXInitSCTL( struct sctl_io *sctl_io, int i_type )
-{
- memset( sctl_io->data, 0, sctl_io->data_length );
-
- switch( i_type )
- {
- case GPCMD_SEND_KEY:
- /* leave the flags to 0 */
- break;
-
- case GPCMD_READ_DVD_STRUCTURE:
- case GPCMD_REPORT_KEY:
- sctl_io->flags = SCTL_READ;
- break;
- }
-
- sctl_io->cdb[ 0 ] = i_type;
-
- sctl_io->cdb[ 8 ] = (sctl_io->data_length >> 8) & 0xff;
- sctl_io->cdb[ 9 ] = sctl_io->data_length & 0xff;
- sctl_io->cdb_length = 12;
-
- sctl_io->max_msecs = 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 96a06d4..b01ddcb 100644
--- a/src/ioctl.h
+++ b/src/ioctl.h
@@ -54,18 +54,6 @@ int ioctl_ReportRPC ( int, int *, int *, int * );
#endif

/*****************************************************************************
- * Common macro, HP-UX specific
- *****************************************************************************/
-#if defined( HPUX_SCTL_IO )
-#define INIT_SCTL_IO( TYPE, SIZE ) \
- struct sctl_io sctl_io = { 0 }; \
- uint8_t p_buffer[ (SIZE)+1 ]; \
- sctl_io.data = (void *)p_buffer; \
- sctl_io.data_length = (SIZE); \
- HPUXInitSCTL( &sctl_io, (TYPE) );
-#endif
-
-/*****************************************************************************
* Common macro, Solaris specific
*****************************************************************************/
#if defined( SOLARIS_USCSI )
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 8a06c53..e9895c1 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -30,7 +30,7 @@
* 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, HP-UX, OS/2, Windows 98 SE
+ * NetBSD, OpenBSD, BeOS, Mac OS X, Solaris, OS/2, Windows 98 SE
* (with IE 5.0) or later, 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
diff --git a/test/dvd_region.c b/test/dvd_region.c
index 903b91d..d5e80fd 100644
--- a/test/dvd_region.c
+++ b/test/dvd_region.c
@@ -65,16 +65,6 @@ static int ioctl_SendRPC( int i_fd, int i_pdrc )

i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );

-#elif defined( HPUX_SCTL_IO )
- INIT_SCTL_IO( GPCMD_SEND_KEY, 8 );
-
- sctl_io.cdb[ 10 ] = DVD_SEND_RPC;
-
- p_buffer[ 1 ] = 6;
- p_buffer[ 4 ] = i_pdrc;
-
- i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
-
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_SEND_KEY, 8 );
--
1.9.1
Jean-Baptiste Kempf
2014-10-21 06:41:43 UTC
Permalink
Post by Diego Biurrun
-N: David Siebörger
-D: HP-UX port of the DVD ioctls
Please don't do that.

With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Diego Biurrun
2014-10-21 09:09:33 UTC
Permalink
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
-N: David Siebörger
-D: HP-UX port of the DVD ioctls
Please don't do that.
Already fixed locally. What about the rest?

Diego
Jean-Baptiste Kempf
2014-10-21 09:11:08 UTC
Permalink
Post by Diego Biurrun
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
-N: David Siebörger
-D: HP-UX port of the DVD ioctls
Please don't do that.
Already fixed locally. What about the rest?
ENOCARE :)

With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Diego Biurrun
2014-10-21 09:13:05 UTC
Permalink
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
-N: David Siebörger
-D: HP-UX port of the DVD ioctls
Please don't do that.
Already fixed locally. What about the rest?
ENOCARE :)
I shall soon kill it with fire then :)

Diego
Jean-Baptiste Kempf
2014-10-21 09:13:32 UTC
Permalink
Post by Diego Biurrun
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
-N: David Siebörger
-D: HP-UX port of the DVD ioctls
Please don't do that.
Already fixed locally. What about the rest?
ENOCARE :)
I shall soon kill it with fire then :)
Remember to NEWS it, btw

With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Diego Biurrun
2014-10-21 09:15:19 UTC
Permalink
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
-N: David Siebörger
-D: HP-UX port of the DVD ioctls
Please don't do that.
Already fixed locally. What about the rest?
ENOCARE :)
I shall soon kill it with fire then :)
Remember to NEWS it, btw
Done locally.

Diego
Diego Biurrun
2014-10-21 18:52:46 UTC
Permalink
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Mon Oct 20 19:11:21 2014 +0200| [6bbef9db8659fd2930a836ea26304fdd9c6b172c] | committer: Diego Biurrun

Remove HP-UX support.

HP-UX is a legacy proprietary Unix with no real-world usage.
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=6bbef9db8659fd2930a836ea26304fdd9c6b172c
---

NEWS | 1 +
configure.ac | 8 ---
libdvdcss.spec.in | 8 +--
msvc/config.h | 1 -
src/ioctl.c | 155 -----------------------------------------------------
src/ioctl.h | 12 -----
src/libdvdcss.c | 2 +-
test/dvd_region.c | 10 ----
8 files changed, 6 insertions(+), 191 deletions(-)

Diff: http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commitdiff;h=6bbef9db8659fd2930a836ea26304fdd9c6b172c
Diego Biurrun
2014-10-21 19:17:08 UTC
Permalink
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Mon Oct 20 19:11:21 2014 +0200| [586bb8003decf6c5e1526b0959bb8a8a08083a10] | committer: Diego Biurrun

Remove HP-UX support.

HP-UX is a legacy proprietary Unix with no real-world usage.
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=586bb8003decf6c5e1526b0959bb8a8a08083a10
---

NEWS | 1 +
configure.ac | 8 ---
libdvdcss.spec.in | 8 +--
msvc/config.h | 1 -
src/ioctl.c | 155 -----------------------------------------------------
src/ioctl.h | 12 -----
src/libdvdcss.c | 2 +-
test/dvd_region.c | 10 ----
8 files changed, 6 insertions(+), 191 deletions(-)

Diff: http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commitdiff;h=586bb8003decf6c5e1526b0959bb8a8a08083a10
Loading...