Thomas Schmitt's first patches towards supporting writing from libcdio. Somewhat experimental and for now just the GNU/Linux driver.
This commit is contained in:
@@ -375,15 +375,17 @@ typedef struct mmc_cdb_s {
|
||||
unsigned char profile_msb;
|
||||
unsigned char profile_lsb;
|
||||
} cdio_mmc_feature_list_header_t;
|
||||
|
||||
/** An enumeration indicating whether an MMC command is sending
|
||||
data or getting data.
|
||||
data, or getting data, or does none of both.
|
||||
*/
|
||||
typedef enum mmc_direction_s {
|
||||
SCSI_MMC_DATA_READ,
|
||||
SCSI_MMC_DATA_WRITE
|
||||
SCSI_MMC_DATA_WRITE,
|
||||
SCSI_MMC_DATA_NONE
|
||||
} cdio_mmc_direction_t;
|
||||
|
||||
/** Indicate to applications that SCSI_MMC_DATA_NONE is available
|
||||
*/
|
||||
#define SCSI_MMC_HAS_DIR_NONE 1
|
||||
typedef struct mmc_subchannel_s
|
||||
{
|
||||
uint8_t reserved;
|
||||
|
||||
@@ -1227,10 +1227,9 @@ run_mmc_cmd_linux( void *p_user_data,
|
||||
memcpy(&cgc.cmd, p_cdb, i_cdb);
|
||||
cgc.buflen = i_buf;
|
||||
cgc.buffer = p_buf;
|
||||
cgc.data_direction = (SCSI_MMC_DATA_READ == cgc.data_direction)
|
||||
cgc.data_direction = (SCSI_MMC_DATA_READ == e_direction)
|
||||
? CGC_DATA_READ : CGC_DATA_WRITE;
|
||||
|
||||
#ifdef HAVE_LINUX_CDROM_TIMEOUT
|
||||
#ifdef HAVE_LINUX_CDROM_TIMEOUT
|
||||
cgc.timeout = i_timeout_ms;
|
||||
#endif
|
||||
|
||||
@@ -1639,7 +1638,7 @@ cdio_open_am_linux (const char *psz_orig_source, const char *access_mode)
|
||||
|
||||
ret->driver_id = DRIVER_LINUX;
|
||||
|
||||
if (cdio_generic_init(_data, O_RDONLY|O_NONBLOCK)) {
|
||||
if (cdio_generic_init(_data, O_RDWR|O_NONBLOCK)) {
|
||||
return ret;
|
||||
} else {
|
||||
cdio_generic_free (_data);
|
||||
|
||||
Reference in New Issue
Block a user