get_dvd_physical common routine now works.

This commit is contained in:
rocky
2004-07-26 04:33:21 +00:00
parent 50532e7025
commit 8000e161a2
3 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: aspi32.c,v 1.38 2004/07/26 03:58:25 rocky Exp $ $Id: aspi32.c,v 1.39 2004/07/26 04:33:21 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: aspi32.c,v 1.38 2004/07/26 03:58:25 rocky Exp $"; static const char _rcsid[] = "$Id: aspi32.c,v 1.39 2004/07/26 04:33:21 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -192,7 +192,7 @@ get_discmode_aspi (_img_private_t *p_env)
dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL; dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL;
dvd.physical.layer_num = 0; dvd.physical.layer_num = 0;
if (0 == get_dvd_struct_physical_mmc (p_env, if (0 == get_dvd_struct_physical_mmc (p_env,
&scsi_mmc_run_cmd_aspi, scsi_mmc_run_cmd_aspi,
&dvd)) { &dvd)) {
switch(dvd.physical.layer[0].book_type) { switch(dvd.physical.layer[0].book_type) {
case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM;

View File

@@ -1,6 +1,6 @@
/* Common SCSI Multimedia Command (MMC) routines. /* Common SCSI Multimedia Command (MMC) routines.
$Id: scsi_mmc.c,v 1.10 2004/07/26 03:58:25 rocky Exp $ $Id: scsi_mmc.c,v 1.11 2004/07/26 04:33:21 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -237,7 +237,7 @@ scsi_mmc_set_bsize ( const CdIo *cdio, unsigned int bsize)
*/ */
discmode_t discmode_t
get_dvd_struct_physical_mmc ( void *p_env, get_dvd_struct_physical_mmc ( void *p_env,
const scsi_mmc_run_cmd_fn_t *run_scsi_mmc_cmd, const scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd,
cdio_dvd_struct_t *s) cdio_dvd_struct_t *s)
{ {
scsi_mmc_cdb_t cdb = {{0, }}; scsi_mmc_cdb_t cdb = {{0, }};
@@ -258,10 +258,10 @@ get_dvd_struct_physical_mmc ( void *p_env,
cdb.field[7] = CDIO_DVD_STRUCT_PHYSICAL; cdb.field[7] = CDIO_DVD_STRUCT_PHYSICAL;
cdb.field[9] = sizeof(buf) & 0xff; cdb.field[9] = sizeof(buf) & 0xff;
i_status = (*run_scsi_mmc_cmd)(p_env, DEFAULT_TIMEOUT_MS, i_status = run_scsi_mmc_cmd(p_env, DEFAULT_TIMEOUT_MS,
scsi_mmc_get_cmd_len(cdb.field[0]), scsi_mmc_get_cmd_len(cdb.field[0]),
&cdb, SCSI_MMC_DATA_READ, &cdb, SCSI_MMC_DATA_READ,
sizeof(buf), &buf); sizeof(buf), &buf);
if (0 != i_status) if (0 != i_status)
return CDIO_DISC_MODE_ERROR; return CDIO_DISC_MODE_ERROR;
@@ -299,7 +299,7 @@ scsi_mmc_get_dvd_struct_physical ( const CdIo *p_cdio, cdio_dvd_struct_t *s)
{ {
if ( ! p_cdio ) return -2; if ( ! p_cdio ) return -2;
return get_dvd_struct_physical_mmc (p_cdio->env, return get_dvd_struct_physical_mmc (p_cdio->env,
(&p_cdio->op.run_scsi_mmc_cmd), p_cdio->op.run_scsi_mmc_cmd,
s); s);
} }

View File

@@ -1,6 +1,6 @@
/* private MMC helper routines. /* private MMC helper routines.
$Id: scsi_mmc_private.h,v 1.3 2004/07/26 03:58:25 rocky Exp $ $Id: scsi_mmc_private.h,v 1.4 2004/07/26 04:33:21 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -37,7 +37,7 @@ int set_bsize_mmc ( const void *p_env,
*/ */
discmode_t discmode_t
get_dvd_struct_physical_mmc ( void *p_env, get_dvd_struct_physical_mmc ( void *p_env,
const scsi_mmc_run_cmd_fn_t *run_scsi_mmc_cmd, const scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd,
cdio_dvd_struct_t *s ); cdio_dvd_struct_t *s );