From 2040c4abf79dc53392618d0084c600597dd0f0b3 Mon Sep 17 00:00:00 2001 From: rocky Date: Thu, 22 Jul 2004 11:00:59 +0000 Subject: [PATCH] Wasn't allowing call of new scsi_mmc_run_cmd. --- lib/_cdio_linux.c | 11 +++++++---- lib/cdio_private.h | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/_cdio_linux.c b/lib/_cdio_linux.c index deac4244..e817a255 100644 --- a/lib/_cdio_linux.c +++ b/lib/_cdio_linux.c @@ -1,5 +1,5 @@ /* - $Id: _cdio_linux.c,v 1.73 2004/07/22 10:13:08 rocky Exp $ + $Id: _cdio_linux.c,v 1.74 2004/07/22 11:00:59 rocky Exp $ Copyright (C) 2001 Herbert Valerio Riedel Copyright (C) 2002, 2003, 2004 Rocky Bernstein @@ -27,7 +27,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.73 2004/07/22 10:13:08 rocky Exp $"; +static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.74 2004/07/22 11:00:59 rocky Exp $"; #include @@ -275,17 +275,19 @@ cdio_check_mounts(const char *mtab) We return true if command completed successfully and false if not. */ static int -scsi_mmc_run_cmd_linux( const _img_private_t *p_env, int i_timeout, +scsi_mmc_run_cmd_linux( const void *p_user_data, int i_timeout, unsigned int i_cdb, const scsi_mmc_cdb_t *p_cdb, scsi_mmc_direction_t e_direction, unsigned int i_buf, /*out*/ void *p_buf ) { + const _img_private_t *p_env = p_user_data; struct cdrom_generic_command cgc; memset (&cgc, 0, sizeof (struct cdrom_generic_command)); memcpy(&cgc.cmd, p_cdb, i_cdb); cgc.buflen = i_buf; cgc.buffer = p_buf; - SCSI_MMC_DATA_READ == cgc.data_direction ? CGC_DATA_READ : CGC_DATA_WRITE; + cgc.data_direction = SCSI_MMC_DATA_READ == cgc.data_direction + ? CGC_DATA_READ : CGC_DATA_WRITE; #ifdef HAVE_LINUX_CDROM_TIMEOUT if (i_timeout >= 0) @@ -1307,6 +1309,7 @@ cdio_open_am_linux (const char *psz_orig_source, const char *access_mode) .read_mode1_sectors = _read_mode1_sectors_linux, .read_mode2_sector = _read_mode2_sector_linux, .read_mode2_sectors = _read_mode2_sectors_linux, + .run_scsi_mmc_cmd = scsi_mmc_run_cmd_linux, .set_arg = _set_arg_linux, .stat_size = _stat_size_linux }; diff --git a/lib/cdio_private.h b/lib/cdio_private.h index b9c7c42e..f0858b01 100644 --- a/lib/cdio_private.h +++ b/lib/cdio_private.h @@ -1,5 +1,5 @@ /* - $Id: cdio_private.h,v 1.32 2004/07/22 09:52:17 rocky Exp $ + $Id: cdio_private.h,v 1.33 2004/07/22 11:00:59 rocky Exp $ Copyright (C) 2003, 2004 Rocky Bernstein @@ -216,7 +216,7 @@ extern "C" { Returns 0 if command completed successfully. */ - int (*run_scsi_mmc_cmd) ( const CdIo *cdio, unsigned int i_timeout, + int (*run_scsi_mmc_cmd) ( const void *env, int i_timeout, unsigned int cdb_len, const scsi_mmc_cdb_t *p_cdb, scsi_mmc_direction_t e_direction,