From 12186bc043edfc26f5695c5a08e2d6180d618cf0 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 6 Feb 2005 11:32:22 +0000 Subject: [PATCH] iso9660_fs.c: wrong order of initialization. correct types on get_media_changed_mmc Solaris fixes. --- doc/version.texi | 2 +- lib/driver/_cdio_sunos.c | 13 +++++++------ lib/driver/cdio_private.h | 4 ++-- lib/driver/image_common.c | 4 ++-- lib/driver/image_common.h | 4 ++-- lib/iso9660/iso9660_fs.c | 7 ++++--- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/doc/version.texi b/doc/version.texi index 346fa9b5..9363977d 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 5 February 2005 +@set UPDATED 6 February 2005 @set UPDATED-MONTH February 2005 @set EDITION 0.73cvs @set VERSION 0.73cvs diff --git a/lib/driver/_cdio_sunos.c b/lib/driver/_cdio_sunos.c index 1b3cd83d..cf31f117 100644 --- a/lib/driver/_cdio_sunos.c +++ b/lib/driver/_cdio_sunos.c @@ -1,5 +1,5 @@ /* - $Id: _cdio_sunos.c,v 1.19 2005/02/06 11:13:37 rocky Exp $ + $Id: _cdio_sunos.c,v 1.20 2005/02/06 11:32:22 rocky Exp $ Copyright (C) 2001 Herbert Valerio Riedel Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -38,7 +38,7 @@ #ifdef HAVE_SOLARIS_CDROM -static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.19 2005/02/06 11:13:37 rocky Exp $"; +static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.20 2005/02/06 11:32:22 rocky Exp $"; #ifdef HAVE_GLOB_H #include @@ -145,10 +145,10 @@ init_solaris (_img_private_t *p_env) p_buf Buffer for data, both sending and receiving */ static driver_return_code_t -run_scsi_cmd_solaris( void *p_user_data, unsigned int i_timeout_ms, - unsigned int i_cdb, const mmc_cdb_t *p_cdb, - mmc_direction_t e_direction, - unsigned int i_buf, /*in/out*/ void *p_buf ) +run_mmc_cmd_solaris( void *p_user_data, unsigned int i_timeout_ms, + unsigned int i_cdb, const scsi_mmc_cdb_t *p_cdb, + scsi_mmc_direction_t e_direction, + unsigned int i_buf, /*in/out*/ void *p_buf ) { const _img_private_t *p_env = p_user_data; struct uscsi_cmd cgc; @@ -855,6 +855,7 @@ cdio_open_am_solaris (const char *psz_orig_source, const char *access_mode) _funcs.get_drive_cap = get_drive_cap_mmc; _funcs.get_first_track_num = get_first_track_num_generic; _funcs.get_hwinfo = NULL; + _funcs.get_media_changed = get_media_changed_mmc, _funcs.get_mcn = get_mcn_mmc, _funcs.get_num_tracks = get_num_tracks_generic; _funcs.get_track_channels = get_track_channels_generic, diff --git a/lib/driver/cdio_private.h b/lib/driver/cdio_private.h index da3a5081..8c0b5a63 100644 --- a/lib/driver/cdio_private.h +++ b/lib/driver/cdio_private.h @@ -1,5 +1,5 @@ /* - $Id: cdio_private.h,v 1.13 2005/02/06 11:13:37 rocky Exp $ + $Id: cdio_private.h,v 1.14 2005/02/06 11:32:22 rocky Exp $ Copyright (C) 2003, 2004, 2005 Rocky Bernstein @@ -150,7 +150,7 @@ extern "C" { @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ - int (*get_media_changed) (void *p_env); + int (*get_media_changed) (const void *p_env); /*! Return the media catalog number MCN from the CD or NULL if diff --git a/lib/driver/image_common.c b/lib/driver/image_common.c index c4b3a0de..664e97f2 100644 --- a/lib/driver/image_common.c +++ b/lib/driver/image_common.c @@ -1,5 +1,5 @@ /* - $Id: image_common.c,v 1.8 2005/02/06 11:13:37 rocky Exp $ + $Id: image_common.c,v 1.9 2005/02/06 11:32:22 rocky Exp $ Copyright (C) 2004, 2005 Rocky Bernstein @@ -154,7 +154,7 @@ _get_first_track_num_image(void *p_user_data) We always return DRIVER_OP_UNSUPPORTED. */ int -get_media_changed_image(void *p_user_data) +get_media_changed_image(const void *p_user_data) { return DRIVER_OP_UNSUPPORTED; } diff --git a/lib/driver/image_common.h b/lib/driver/image_common.h index 23e63546..26b08f61 100644 --- a/lib/driver/image_common.h +++ b/lib/driver/image_common.h @@ -1,5 +1,5 @@ /* - $Id: image_common.h,v 1.7 2005/02/06 11:13:37 rocky Exp $ + $Id: image_common.h,v 1.8 2005/02/06 11:32:22 rocky Exp $ Copyright (C) 2004, 2005 Rocky Bernstein @@ -106,7 +106,7 @@ track_t _get_first_track_num_image(void *p_user_data); return codes are the same as driver_return_code_t We always return DRIVER_OP_UNSUPPORTED. */ -int get_media_changed_image(void *p_user_data); +int get_media_changed_image(const void *p_user_data); /*! Return the media catalog number (MCN) from the CD or NULL if there diff --git a/lib/iso9660/iso9660_fs.c b/lib/iso9660/iso9660_fs.c index 6f2b64da..393b6624 100644 --- a/lib/iso9660/iso9660_fs.c +++ b/lib/iso9660/iso9660_fs.c @@ -1,5 +1,5 @@ /* - $Id: iso9660_fs.c,v 1.9 2005/02/05 18:58:36 rocky Exp $ + $Id: iso9660_fs.c,v 1.10 2005/02/06 11:32:22 rocky Exp $ Copyright (C) 2001 Herbert Valerio Riedel Copyright (C) 2003, 2004, 2005 Rocky Bernstein @@ -58,7 +58,7 @@ typedef enum { } bool_3way_t; -static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.9 2005/02/05 18:58:36 rocky Exp $"; +static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.10 2005/02/06 11:32:22 rocky Exp $"; /* Implementation of iso9660_t type */ struct _iso9660 { @@ -1220,11 +1220,12 @@ iso9660_fs_stat (CdIo_t *p_cdio, const char psz_path[]) if (!p_cdio) return NULL; if (!psz_path) return NULL; - if (!p_root) return NULL; b_mode2 = cdio_get_track_green(p_cdio, 1); p_root = _fs_stat_root (p_cdio); + if (!p_root) return NULL; + switch(cdio_get_discmode(p_cdio)) { case CDIO_DISC_MODE_CD_XA: b_xa = yep;