Remove a number of const's since Darwin's run_scsi_mmc doesn't work

that way :-(
This commit is contained in:
rocky
2005-01-21 20:54:55 +00:00
parent c5462f0fad
commit 51639aaa86
7 changed files with 31 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_aix.c,v 1.4 2005/01/21 02:59:32 rocky Exp $ $Id: _cdio_aix.c,v 1.5 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -37,7 +37,7 @@
#ifdef HAVE_AIX_CDROM #ifdef HAVE_AIX_CDROM
static const char _rcsid[] = "$Id: _cdio_aix.c,v 1.4 2005/01/21 02:59:32 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_aix.c,v 1.5 2005/01/21 20:54:55 rocky Exp $";
#ifdef HAVE_GLOB_H #ifdef HAVE_GLOB_H
#include <glob.h> #include <glob.h>
@@ -197,10 +197,10 @@ init_aix (_img_private_t *p_env)
Return 0 if no error. Return 0 if no error.
*/ */
static int static int
run_scsi_cmd_aix( const void *p_user_data, unsigned int i_timeout_ms, run_scsi_cmd_aix( 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;
struct sc_passthru cgc; struct sc_passthru cgc;

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_bsdi.c,v 1.5 2005/01/21 02:59:32 rocky Exp $ $Id: _cdio_bsdi.c,v 1.6 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.5 2005/01/21 02:59:32 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.6 2005/01/21 20:54:55 rocky Exp $";
#include <cdio/logging.h> #include <cdio/logging.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -94,7 +94,7 @@ typedef struct cgc
This code adapted from Steven M. Schultz's libdvd This code adapted from Steven M. Schultz's libdvd
*/ */
static int static int
run_scsi_cmd_bsdi(const void *p_user_data, unsigned int i_timeout_ms, run_scsi_cmd_bsdi(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 )

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_linux.c,v 1.15 2005/01/21 02:59:32 rocky Exp $ $Id: _cdio_linux.c,v 1.16 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.15 2005/01/21 02:59:32 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.16 2005/01/21 20:54:55 rocky Exp $";
#include <string.h> #include <string.h>
@@ -99,7 +99,7 @@ typedef struct {
/**** prototypes for static functions ****/ /**** prototypes for static functions ****/
static bool is_cdrom_linux(const char *drive, char *mnttype); static bool is_cdrom_linux(const char *drive, char *mnttype);
static bool read_toc_linux (void *p_user_data); static bool read_toc_linux (void *p_user_data);
static int run_scsi_cmd_linux( const void *p_user_data, static int run_scsi_cmd_linux( void *p_user_data,
unsigned int i_timeout, unsigned int i_timeout,
unsigned int i_cdb, unsigned int i_cdb,
const scsi_mmc_cdb_t *p_cdb, const scsi_mmc_cdb_t *p_cdb,
@@ -899,7 +899,7 @@ read_toc_linux (void *p_user_data)
We return true if command completed successfully and false if not. We return true if command completed successfully and false if not.
*/ */
static int static int
run_scsi_cmd_linux( const void *p_user_data, run_scsi_cmd_linux( 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,

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_osx.c,v 1.8 2005/01/21 03:15:36 rocky Exp $ $Id: _cdio_osx.c,v 1.9 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
from vcdimager code: from vcdimager code:
@@ -34,7 +34,7 @@
#include "config.h" #include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.8 2005/01/21 03:15:36 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.9 2005/01/21 20:54:55 rocky Exp $";
#include <cdio/logging.h> #include <cdio/logging.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -353,7 +353,7 @@ init_osx(_img_private_t *p_env) {
/* process a complete scsi command. */ /* process a complete scsi command. */
// handle_scsi_cmd(cdrom_drive *d, // handle_scsi_cmd(cdrom_drive *d,
static int static int
run_scsi_cmd_osx( const void *p_user_data, run_scsi_cmd_osx( 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,

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_sunos.c,v 1.12 2005/01/21 02:59:32 rocky Exp $ $Id: _cdio_sunos.c,v 1.13 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -38,7 +38,7 @@
#ifdef HAVE_SOLARIS_CDROM #ifdef HAVE_SOLARIS_CDROM
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.12 2005/01/21 02:59:32 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.13 2005/01/21 20:54:55 rocky Exp $";
#ifdef HAVE_GLOB_H #ifdef HAVE_GLOB_H
#include <glob.h> #include <glob.h>
@@ -147,7 +147,7 @@ init_solaris (_img_private_t *p_env)
Return 0 if no error. Return 0 if no error.
*/ */
static int static int
run_scsi_cmd_solaris( const void *p_user_data, unsigned int i_timeout_ms, run_scsi_cmd_solaris( 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 )

View File

@@ -1,6 +1,6 @@
/* Common SCSI Multimedia Command (MMC) routines. /* Common SCSI Multimedia Command (MMC) routines.
$Id: scsi_mmc.c,v 1.8 2005/01/21 02:59:32 rocky Exp $ $Id: scsi_mmc.c,v 1.9 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -188,7 +188,7 @@ scsi_mmc_run_cmd( const CdIo_t *p_cdio, unsigned int i_timeout_ms,
#define DEFAULT_TIMEOUT_MS 6000 #define DEFAULT_TIMEOUT_MS 6000
int int
scsi_mmc_get_blocksize_private ( const void *p_env, scsi_mmc_get_blocksize_private ( 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)
{ {
int i_status = 0; int i_status = 0;
@@ -311,7 +311,7 @@ scsi_mmc_read_sectors ( const CdIo_t *p_cdio, void *p_buf, lba_t lba,
} }
driver_return_code_t driver_return_code_t
scsi_mmc_set_blocksize_private ( const void *p_env, scsi_mmc_set_blocksize_private ( 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,
unsigned int i_bsize) unsigned int i_bsize)
{ {
@@ -366,7 +366,7 @@ scsi_mmc_set_blocksize ( const CdIo_t *p_cdio, unsigned int i_blocksize)
Return the the kind of drive capabilities of device. Return the the kind of drive capabilities of device.
*/ */
void void
scsi_mmc_get_drive_cap_private (const void *p_env, scsi_mmc_get_drive_cap_private (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,
/*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_read_cap_t *p_read_cap,
/*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap,

View File

@@ -1,6 +1,6 @@
/* private MMC helper routines. /* private MMC helper routines.
$Id: scsi_mmc_private.h,v 1.2 2005/01/21 02:59:32 rocky Exp $ $Id: scsi_mmc_private.h,v 1.3 2005/01/21 20:54:55 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -34,7 +34,7 @@ msecs2secs(unsigned int msecs)
#undef SECS2MSECS #undef SECS2MSECS
typedef typedef
int (*scsi_mmc_run_cmd_fn_t) ( const void *p_user_data, int (*scsi_mmc_run_cmd_fn_t) ( void *p_user_data,
unsigned int i_timeout_ms, unsigned int i_timeout_ms,
unsigned int i_cdb, unsigned int i_cdb,
const scsi_mmc_cdb_t *p_cdb, const scsi_mmc_cdb_t *p_cdb,
@@ -55,14 +55,14 @@ scsi_mmc_get_dvd_struct_physical_private ( void *p_env, const
int int
scsi_mmc_get_blocksize_private ( const void *p_env, scsi_mmc_get_blocksize_private ( void *p_env,
const scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd); scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd);
char *scsi_mmc_get_mcn_private ( void *p_env, char *scsi_mmc_get_mcn_private ( void *p_env,
const scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd
); );
bool scsi_mmc_init_cdtext_private ( void *user_data, const bool scsi_mmc_init_cdtext_private ( void *p_user_data,
scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd, scsi_mmc_run_cmd_fn_t run_scsi_mmc_cmd,
set_cdtext_field_fn_t set_cdtext_field_fn set_cdtext_field_fn_t set_cdtext_field_fn
); );
@@ -85,13 +85,13 @@ void scsi_mmc_get_drive_cap_buf(const uint8_t *p,
*/ */
void void
scsi_mmc_get_drive_cap_private (const void *p_env, scsi_mmc_get_drive_cap_private ( 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,
/*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_read_cap_t *p_read_cap,
/*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap,
/*out*/ cdio_drive_misc_cap_t *p_misc_cap); /*out*/ cdio_drive_misc_cap_t *p_misc_cap);
int int
scsi_mmc_set_blocksize_private ( const void *p_env, scsi_mmc_set_blocksize_private ( 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,
unsigned int i_bsize); unsigned int i_bsize);