Hi,
it appears that run_mmc_cmd_linux() in
libcdio-0.82/lib/driver/gnu_linux.c
works only for transfer direction CGC_DATA_READ
and this only by accident.
I read:
static driver_return_code_t
run_mmc_cmd_linux( void *p_user_data,
...
cdio_mmc_direction_t e_direction,
...
{
...
memset (&cgc, 0, sizeof (struct cdrom_generic_command));
...
cgc.data_direction = (SCSI_MMC_DATA_READ == cgc.data_direction)
? CGC_DATA_READ : CGC_DATA_WRITE;
This ignores parameter e_direction and always
yields CGC_DATA_READ because SCSI_MMC_DATA_READ
is 0 and cgc.data_direction is initialized 0.
The statement should rather be
cgc.data_direction = (SCSI_MMC_DATA_READ == e_direction)
? CGC_DATA_READ : CGC_DATA_WRITE;
and even then there is no way to express
direction CGC_DATA_NONE.
The libcdio API does not define a
SCSI_MMC_DATA_NONE
I checked in growisofs. It uses all three
CGC_DATA_* macros when using CDROM_SEND_PACKET.
Have a nice day :)
Thomas