compilation fixes

This commit is contained in:
rocky
2004-07-28 03:17:56 +00:00
parent 6041f8ae47
commit 257a956093
5 changed files with 46 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: aspi32.c,v 1.43 2004/07/28 01:55:03 rocky Exp $ $Id: aspi32.c,v 1.44 2004/07/28 03:17:56 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -27,12 +27,12 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: aspi32.c,v 1.43 2004/07/28 01:55:03 rocky Exp $"; static const char _rcsid[] = "$Id: aspi32.c,v 1.44 2004/07/28 03:17:56 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
#include <cdio/util.include> #include <cdio/util.h>
#h <cdio/scsi_mmc.h> #include <cdio/scsi_mmc.h>
#include "cdio_assert.h" #include "cdio_assert.h"
#include <string.h> #include <string.h>
@@ -476,7 +476,7 @@ init_aspi (_img_private_t *env)
Run a SCSI MMC command. Run a SCSI MMC command.
env private CD structure env private CD structure
i_timeout time in milliseconds we will wait for the command i_timeout_ms time in milliseconds we will wait for the command
to complete. If this value is -1, use the default to complete. If this value is -1, use the default
time-out value. time-out value.
p_buf Buffer for data, both sending and receiving p_buf Buffer for data, both sending and receiving
@@ -491,7 +491,7 @@ int
run_scsi_cmd_aspi( const void *p_user_data, unsigned int i_timeout_ms, run_scsi_cmd_aspi( const void *p_user_data, unsigned int i_timeout_ms,
unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb, unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb,
scsi_mmc_direction_t e_direction, scsi_mmc_direction_t e_direction,
unsigned int i_buf, /*in/out*/ void *p_buf ) unsigned int i_buf, /*in/out*/ void *p_buf )
{ {
const _img_private_t *p_env = p_user_data; const _img_private_t *p_env = p_user_data;
HANDLE hEvent; HANDLE hEvent;
@@ -825,7 +825,7 @@ get_drive_cap_aspi (const _img_private_t *p_env,
/* Don't handle these yet. */ /* Don't handle these yet. */
break; break;
case CDIO_MMC_CAPABILITIES_PAGE: case CDIO_MMC_CAPABILITIES_PAGE:
scsi_mmc_get_drive_cap(p, p_read_cap, p_write_cap, p_misc_cap); scsi_mmc_get_drive_cap_buf(p, p_read_cap, p_write_cap, p_misc_cap);
break; break;
default: ; default: ;
} }

View File

@@ -1,6 +1,6 @@
/* Win32 aspi specific */ /* Win32 aspi specific */
/* /*
$Id: aspi32.h,v 1.11 2004/07/25 17:32:19 rocky Exp $ $Id: aspi32.h,v 1.12 2004/07/28 03:17:56 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -252,9 +252,10 @@ bool read_toc_aspi (_img_private_t *env);
Return 0 if command completed successfully. Return 0 if command completed successfully.
*/ */
int scsi_mmc_run_cmd_aspi( const void *p_user_data, int i_timeout, int run_scsi_cmd_aspi( const void *p_user_data,
unsigned int i_cdb, unsigned int i_timeout,
const scsi_mmc_cdb_t * p_cdb, unsigned int i_cdb,
scsi_mmc_direction_t e_direction, const scsi_mmc_cdb_t * p_cdb,
unsigned int i_buf, /*in/out*/ void *p_buf ); scsi_mmc_direction_t e_direction,
unsigned int i_buf, /*in/out*/ void *p_buf );

View File

@@ -1,5 +1,5 @@
/* /*
$Id: win32.c,v 1.34 2004/07/28 01:55:03 rocky Exp $ $Id: win32.c,v 1.35 2004/07/28 03:17:56 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: win32.c,v 1.34 2004/07/28 01:55:03 rocky Exp $"; static const char _rcsid[] = "$Id: win32.c,v 1.35 2004/07/28 03:17:56 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -141,7 +141,7 @@ _cdio_get_drive_cap (const void *env,
Run a SCSI MMC command. Run a SCSI MMC command.
env private CD structure env private CD structure
i_timeout time in milliseconds we will wait for the command i_timeout_ms time in milliseconds we will wait for the command
to complete. If this value is -1, use the default to complete. If this value is -1, use the default
time-out value. time-out value.
p_buf Buffer for data, both sending and receiving p_buf Buffer for data, both sending and receiving
@@ -153,19 +153,19 @@ _cdio_get_drive_cap (const void *env,
Return 0 if command completed successfully. Return 0 if command completed successfully.
*/ */
static int static int
scsi_mmc_run_cmd_win32( const void *p_user_data, int i_timeout, run_scsi_cmd_win32( const void *p_user_data, unsigned int i_timeout_ms,
unsigned int i_cdb, const scsi_mmc_cdb_t *p_cdb, unsigned int i_cdb, const scsi_mmc_cdb_t *p_cdb,
scsi_mmc_direction_t e_direction, scsi_mmc_direction_t e_direction,
unsigned int i_buf, /*in/out*/ void *p_buf ) unsigned int i_buf, /*in/out*/ void *p_buf )
{ {
const _img_private_t *p_env = p_user_data; const _img_private_t *p_env = p_user_data;
if (p_env->hASPI) { if (p_env->hASPI) {
return scsi_mmc_run_cmd_aspi( p_env, i_timeout, i_cdb, p_cdb, return run_scsi_cmd_aspi( p_env, i_timeout_ms, i_cdb, p_cdb,
e_direction, i_buf, p_buf ); e_direction, i_buf, p_buf );
} else { } else {
return scsi_mmc_run_cmd_win32ioctl( p_env, i_timeout, i_cdb, p_cdb, return run_scsi_cmd_win32ioctl( p_env, i_timeout_ms, i_cdb, p_cdb,
e_direction, i_buf, p_buf ); e_direction, i_buf, p_buf );
} }
} }
@@ -801,7 +801,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode)
.read_mode1_sectors = _cdio_read_mode1_sectors, .read_mode1_sectors = _cdio_read_mode1_sectors,
.read_mode2_sector = _cdio_read_mode2_sector, .read_mode2_sector = _cdio_read_mode2_sector,
.read_mode2_sectors = _cdio_read_mode2_sectors, .read_mode2_sectors = _cdio_read_mode2_sectors,
.run_scsi_mmc_cmd = scsi_mmc_run_cmd_win32, .run_scsi_mmc_cmd = run_scsi_cmd_win32,
.set_arg = _set_arg_win32, .set_arg = _set_arg_win32,
.stat_size = _cdio_stat_size .stat_size = _cdio_stat_size
}; };

View File

@@ -1,5 +1,5 @@
/* /*
$Id: win32.h,v 1.16 2004/07/27 01:06:02 rocky Exp $ $Id: win32.h,v 1.17 2004/07/28 03:17:56 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -93,7 +93,7 @@ const char *is_cdrom_win32ioctl (const char drive_letter);
Run a SCSI MMC command. Run a SCSI MMC command.
env private CD structure env private CD structure
i_timeout time in milliseconds we will wait for the command i_timeout_ms time in milliseconds we will wait for the command
to complete. If this value is -1, use the default to complete. If this value is -1, use the default
time-out value. time-out value.
p_buf Buffer for data, both sending and receiving p_buf Buffer for data, both sending and receiving
@@ -104,11 +104,12 @@ const char *is_cdrom_win32ioctl (const char drive_letter);
Return 0 if command completed successfully. Return 0 if command completed successfully.
*/ */
int scsi_mmc_run_cmd_win32ioctl( const void *p_user_data, int i_timeout, int run_scsi_cmd_win32ioctl( const void *p_user_data,
unsigned int i_cdb, unsigned int i_timeout,
const scsi_mmc_cdb_t * p_cdb, unsigned int i_cdb,
scsi_mmc_direction_t e_direction, const scsi_mmc_cdb_t * p_cdb,
unsigned int i_buf, /*in/out*/ void *p_buf ); scsi_mmc_direction_t e_direction,
unsigned int i_buf, /*in/out*/ void *p_buf );
/*! /*!
Initialize internal structures for CD device. Initialize internal structures for CD device.

View File

@@ -1,5 +1,5 @@
/* /*
$Id: win32_ioctl.c,v 1.29 2004/07/28 01:55:03 rocky Exp $ $Id: win32_ioctl.c,v 1.30 2004/07/28 03:17:56 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: win32_ioctl.c,v 1.29 2004/07/28 01:55:03 rocky Exp $"; static const char _rcsid[] = "$Id: win32_ioctl.c,v 1.30 2004/07/28 03:17:56 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -144,11 +144,11 @@ typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
Return 0 if command completed successfully. Return 0 if command completed successfully.
*/ */
int int
scsi_mmc_run_cmd_win32ioctl( const void *p_user_data, run_scsi_cmd_win32ioctl( const void *p_user_data,
unsigned int i_timeout_ms, unsigned int i_timeout_ms,
unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb, unsigned int i_cdb, const scsi_mmc_cdb_t * p_cdb,
scsi_mmc_direction_t e_direction, scsi_mmc_direction_t e_direction,
unsigned int i_buf, /*in/out*/ void *p_buf ) unsigned int i_buf, /*in/out*/ void *p_buf )
{ {
const _img_private_t *p_env = p_user_data; const _img_private_t *p_env = p_user_data;
SCSI_PASS_THROUGH_DIRECT sptd; SCSI_PASS_THROUGH_DIRECT sptd;
@@ -206,7 +206,7 @@ get_discmode_win32ioctl (_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 == scsi_mmc_get_dvd_struct_physical_private (p_env, if (0 == scsi_mmc_get_dvd_struct_physical_private (p_env,
&scsi_mmc_run_cmd_win32ioctl, &run_scsi_cmd_win32ioctl,
&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;
@@ -364,7 +364,7 @@ read_raw_sector (const _img_private_t *p_env, void *p_buf, lsn_t lsn)
cdb.field[9]=0xF8; /* Raw read, 2352 bytes per sector */ cdb.field[9]=0xF8; /* Raw read, 2352 bytes per sector */
return scsi_mmc_run_cmd_win32ioctl(p_env, OP_TIMEOUT_MS, return run_scsi_cmd_win32ioctl(p_env, OP_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,
CDIO_CD_FRAMESIZE_RAW, p_buf); CDIO_CD_FRAMESIZE_RAW, p_buf);
@@ -512,7 +512,7 @@ bool
init_cdtext_win32ioctl (_img_private_t *p_env) init_cdtext_win32ioctl (_img_private_t *p_env)
{ {
return scsi_mmc_init_cdtext_private( p_env->gen.cdio, return scsi_mmc_init_cdtext_private( p_env->gen.cdio,
&scsi_mmc_run_cmd_win32ioctl, &run_scsi_cmd_win32ioctl,
set_cdtext_field_win32 set_cdtext_field_win32
); );
} }
@@ -626,8 +626,8 @@ get_drive_cap_win32ioctl (const _img_private_t *p_env,
FALSE) ) { FALSE) ) {
unsigned int n=sptwb.DataBuf[3]+4; unsigned int n=sptwb.DataBuf[3]+4;
/* Reader? */ /* Reader? */
scsi_mmc_get_drive_cap(&(sptwb.DataBuf[n]), p_read_cap, scsi_mmc_get_drive_cap_buf(&(sptwb.DataBuf[n]), p_read_cap,
p_write_cap, p_misc_cap); p_write_cap, p_misc_cap);
} else { } else {
*p_read_cap = CDIO_DRIVE_CAP_UNKNOWN; *p_read_cap = CDIO_DRIVE_CAP_UNKNOWN;
*p_write_cap = CDIO_DRIVE_CAP_UNKNOWN; *p_write_cap = CDIO_DRIVE_CAP_UNKNOWN;