Bug: passing wrong object.

This commit is contained in:
rocky
2004-07-29 05:24:21 +00:00
parent 2ba3136636
commit af2d3d31c0

View File

@@ -1,6 +1,6 @@
/* Common SCSI Multimedia Command (MMC) routines. /* Common SCSI Multimedia Command (MMC) routines.
$Id: scsi_mmc.c,v 1.16 2004/07/28 11:45:21 rocky Exp $ $Id: scsi_mmc.c,v 1.17 2004/07/29 05:24:21 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -98,13 +98,13 @@ scsi_mmc_get_cmd_len(uint8_t scsi_cmd)
We return 0 if command completed successfully and 1 if not. We return 0 if command completed successfully and 1 if not.
*/ */
int int
scsi_mmc_run_cmd( const CdIo *cdio, unsigned int i_timeout, scsi_mmc_run_cmd( const CdIo *p_cdio, unsigned int i_timeout,
const scsi_mmc_cdb_t *p_cdb, const scsi_mmc_cdb_t *p_cdb,
scsi_mmc_direction_t e_direction, unsigned int i_buf, scsi_mmc_direction_t e_direction, unsigned int i_buf,
/*in/out*/ void *p_buf ) /*in/out*/ void *p_buf )
{ {
if (cdio && cdio->op.run_scsi_mmc_cmd) { if (p_cdio && p_cdio->op.run_scsi_mmc_cmd) {
return cdio->op.run_scsi_mmc_cmd(cdio, i_timeout, return p_cdio->op.run_scsi_mmc_cmd(p_cdio->env, i_timeout,
scsi_mmc_get_cmd_len(p_cdb->field[0]), scsi_mmc_get_cmd_len(p_cdb->field[0]),
p_cdb, e_direction, i_buf, p_buf); p_cdb, e_direction, i_buf, p_buf);
} else } else