ref: 5cb06542b1a0c88e585bb78dc00d0d31970e5833
parent: 20621b7176cab00a967d98a3e25282a0d675b09c
author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
date: Thu Feb 14 06:03:13 EST 2013
ioctl: rename DVD_INVALIDATE_AGID to DVDCSS_INVALIDATE_AGID The reason for the rename is that the Linux kernel userspace headers are defining their own version of DVD_INVALIDATE_AGID which has a different meaning (it's an enumeration, not a command).
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -1113,7 +1113,7 @@
#if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info = { 0 };
- auth_info.type = DVD_INVALIDATE_AGID;
+ auth_info.type = DVDCSS_INVALIDATE_AGID;
auth_info.lsa.agid = *pi_agid;
i_ret = ioctl( i_fd, DVD_AUTH, &auth_info );
@@ -1121,7 +1121,7 @@
#elif defined( HAVE_BSD_DVD_STRUCT )
struct dvd_authinfo auth_info = { 0 };
- auth_info.format = DVD_INVALIDATE_AGID;
+ auth_info.format = DVDCSS_INVALIDATE_AGID;
auth_info.agid = *pi_agid;
i_ret = ioctl( i_fd, DVDIOCREPORTKEY, &auth_info );
@@ -1129,7 +1129,7 @@
#elif defined( __BEOS__ )
INIT_RDC( GPCMD_REPORT_KEY, 0 );
- rdc.command[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
+ rdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
@@ -1136,7 +1136,7 @@
#elif defined( HPUX_SCTL_IO )
INIT_SCTL_IO( GPCMD_REPORT_KEY, 0 );
- sctl_io.cdb[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
+ sctl_io.cdb[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
i_ret = ioctl( i_fd, SIOC_IO, &sctl_io );
@@ -1143,7 +1143,7 @@
#elif defined( SOLARIS_USCSI )
INIT_USCSI( GPCMD_REPORT_KEY, 0 );
- rs_cdb.cdb_opaque[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
+ rs_cdb.cdb_opaque[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
i_ret = SolarisSendUSCSI( i_fd, &sc );
@@ -1180,7 +1180,7 @@
ssc.CDBByte[ 9 ] = 0;
#endif
- ssc.CDBByte[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
+ ssc.CDBByte[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
i_ret = WinSendSSC( i_fd, &ssc );
}
@@ -1189,7 +1189,7 @@
INIT_CPT( GPCMD_REPORT_KEY, 0 );
- p_cpt->cam_cdb[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
+ p_cpt->cam_cdb[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL);
@@ -1200,7 +1200,7 @@
sdc.command[ 8 ] = 0;
sdc.command[ 9 ] = 0;
- sdc.command[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
+ sdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
&sdc, sizeof(sdc), &ulParamLen,
--- a/src/ioctl.h
+++ b/src/ioctl.h
@@ -177,7 +177,7 @@
#define DVD_REPORT_ASF 0x05
#define DVD_SEND_RPC 0x06
#define DVD_REPORT_RPC 0x08
-#define DVD_INVALIDATE_AGID 0x3f
+#define DVDCSS_INVALIDATE_AGID 0x3f
/*****************************************************************************
* win32 ioctl specific