Discussion:
[libdvdcss-devel] ioctl: rename DVD_INVALIDATE_AGID to DVDCSS_INVALIDATE_AGID
Diego Elio Pettenò
2013-02-14 20:13:50 UTC
Permalink
libdvdcss | branch: master | Diego Elio Pettenò <***@flameeyes.eu> | Thu Feb 14 11:03:13 2013 -0800| [5cb06542b1a0c88e585bb78dc00d0d31970e5833] | committer: Diego Elio Pettenò

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).
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=5cb06542b1a0c88e585bb78dc00d0d31970e5833
---

src/ioctl.c | 16 ++++++++--------
src/ioctl.h | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/ioctl.c b/src/ioctl.c
index 1b8bf71..61a924e 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -1113,7 +1113,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
#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 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
#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,21 +1129,21 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
#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) );

#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 );

#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 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
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 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )

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 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
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,
diff --git a/src/ioctl.h b/src/ioctl.h
index 54ad54c..8533833 100644
--- a/src/ioctl.h
+++ b/src/ioctl.h
@@ -177,7 +177,7 @@ typedef union dvd_authinfo dvd_authinfo;
#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

Loading...