diff --git a/lib/FreeBSD/freebsd.c b/lib/FreeBSD/freebsd.c index 33b713c9..39809ef1 100644 --- a/lib/FreeBSD/freebsd.c +++ b/lib/FreeBSD/freebsd.c @@ -1,5 +1,5 @@ /* - $Id: freebsd.c,v 1.12 2004/05/13 04:32:13 rocky Exp $ + $Id: freebsd.c,v 1.13 2004/05/16 13:33:26 rocky Exp $ Copyright (C) 2003, 2004 Rocky Bernstein @@ -27,7 +27,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: freebsd.c,v 1.12 2004/05/13 04:32:13 rocky Exp $"; +static const char _rcsid[] = "$Id: freebsd.c,v 1.13 2004/05/16 13:33:26 rocky Exp $"; #include "freebsd.h" @@ -42,7 +42,7 @@ str_to_access_mode_freebsd(const char *psz_access_mode) if (NULL==psz_access_mode) return default_access_mode; - if (!strcmp(psz_access_mode, "IOCTL")) + if (!strcmp(psz_access_mode, "ioctl")) return _AM_IOCTL; else if (!strcmp(psz_access_mode, "CAM")) return _AM_CAM; diff --git a/lib/MSWindows/aspi32.c b/lib/MSWindows/aspi32.c index 91a2425d..21d0ccbe 100644 --- a/lib/MSWindows/aspi32.c +++ b/lib/MSWindows/aspi32.c @@ -1,5 +1,5 @@ /* - $Id: aspi32.c,v 1.5 2004/05/10 03:28:55 rocky Exp $ + $Id: aspi32.c,v 1.6 2004/05/16 13:33:28 rocky Exp $ Copyright (C) 2004 Rocky Bernstein @@ -27,7 +27,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: aspi32.c,v 1.5 2004/05/10 03:28:55 rocky Exp $"; +static const char _rcsid[] = "$Id: aspi32.c,v 1.6 2004/05/16 13:33:28 rocky Exp $"; #include #include @@ -182,7 +182,15 @@ wnaspi32_init_win32 (_img_private_t *env) long (*lpSendCommand)( void* ) = NULL; DWORD dwSupportInfo; int i, j, i_num_adapters; - char c_drive = env->gen.source_name[0]; + char c_drive; + + if (2 == strlen(env->gen.source_name) && isalpha(env->gen.source_name[0]) ) + { + c_drive = env->gen.source_name[0]; + } else if ( 6 == strlen(env->gen.source_name) + && isalpha(env->gen.source_name[4] )) { + c_drive = env->gen.source_name[4]; + } hASPI = LoadLibrary( "wnaspi32.dll" ); if( hASPI != NULL ) { diff --git a/lib/MSWindows/win32.c b/lib/MSWindows/win32.c index 65ea0d43..77296f7c 100644 --- a/lib/MSWindows/win32.c +++ b/lib/MSWindows/win32.c @@ -1,5 +1,5 @@ /* - $Id: win32.c,v 1.15 2004/05/13 01:49:01 rocky Exp $ + $Id: win32.c,v 1.16 2004/05/16 13:33:28 rocky Exp $ Copyright (C) 2003, 2004 Rocky Bernstein @@ -26,7 +26,7 @@ # include "config.h" #endif -static const char _rcsid[] = "$Id: win32.c,v 1.15 2004/05/13 01:49:01 rocky Exp $"; +static const char _rcsid[] = "$Id: win32.c,v 1.16 2004/05/16 13:33:28 rocky Exp $"; #include #include @@ -85,7 +85,7 @@ str_to_access_mode_win32(const char *psz_access_mode) else if (!strcmp(psz_access_mode, "ASPI")) return _AM_ASPI; else { - cdio_warn ("unknown access type: %s. Default 'ioctl' used.", + cdio_warn ("unknown access type: %s. Default used.", psz_access_mode); return default_access_mode; } @@ -144,7 +144,7 @@ _cdio_init_win32 (void *user_data) env->b_aspi_init = false; env->b_ioctl_init = false; - if ( WIN_NT ) { + if ( _AM_IOCTL == env->access_mode ) { return win32ioctl_init_win32(env); } else { return wnaspi32_init_win32(env); @@ -155,7 +155,7 @@ _cdio_init_win32 (void *user_data) Release and free resources associated with cd. */ static void -_cdio_win32_free (void *user_data) +_free_win32 (void *user_data) { _img_private_t *env = user_data; @@ -686,7 +686,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode) cdio_funcs _funcs = { .eject_media = _cdio_eject_media, - .free = _cdio_win32_free, + .free = _free_win32, .get_arg = _cdio_get_arg, .get_default_device = cdio_get_default_device_win32, .get_devices = cdio_get_devices_win32, @@ -710,6 +710,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode) }; _data = _cdio_malloc (sizeof (_img_private_t)); + _data->access_mode = str_to_access_mode_win32(psz_access_mode); _data->gen.init = false; _data->gen.fd = -1; @@ -719,7 +720,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode) _set_arg_win32(_data, "source", psz_source); free(psz_source); } else { - if (cdio_is_device_generic(psz_orig_source)) + if (cdio_is_device_win32(psz_orig_source)) _set_arg_win32(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ @@ -736,7 +737,7 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode) if (_cdio_init_win32(_data)) return ret; else { - _cdio_win32_free (_data); + _free_win32 (_data); return NULL; } diff --git a/lib/image/cdrdao.c b/lib/image/cdrdao.c index 68b555ea..ea6e54c3 100644 --- a/lib/image/cdrdao.c +++ b/lib/image/cdrdao.c @@ -1,5 +1,5 @@ /* - $Id: cdrdao.c,v 1.7 2004/05/13 01:50:24 rocky Exp $ + $Id: cdrdao.c,v 1.8 2004/05/16 13:33:30 rocky Exp $ Copyright (C) 2004 Rocky Bernstein toc reading routine adapted from cuetools @@ -25,7 +25,7 @@ (*.cue). */ -static const char _rcsid[] = "$Id: cdrdao.c,v 1.7 2004/05/13 01:50:24 rocky Exp $"; +static const char _rcsid[] = "$Id: cdrdao.c,v 1.8 2004/05/16 13:33:30 rocky Exp $"; #include "cdio_assert.h" #include "cdio_private.h" @@ -1203,7 +1203,7 @@ CdIo * cdio_open_am_cdrdao (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL && strcmp(psz_access_mode, "image")) - cdio_warn ("there is only one access mode, 'image' for toc. Arg %s ignored", + cdio_warn ("there is only one access mode, 'image' for cdrdao. Arg %s ignored", psz_access_mode); return cdio_open_cdrdao(psz_source_name); } diff --git a/src/cd-info.c b/src/cd-info.c index 467b1ea9..f63ac6e3 100644 --- a/src/cd-info.c +++ b/src/cd-info.c @@ -1,5 +1,5 @@ /* - $Id: cd-info.c,v 1.61 2004/05/13 01:50:28 rocky Exp $ + $Id: cd-info.c,v 1.62 2004/05/16 13:33:40 rocky Exp $ Copyright (C) 2003, 2004 Rocky Bernstein Copyright (C) 1996, 1997, 1998 Gerd Knorr @@ -796,7 +796,7 @@ main(int argc, const char *argv[]) case IMAGE_DEVICE: cdio = cdio_open_am (source_name, DRIVER_DEVICE, opts.access_mode); if (cdio==NULL) { - err_exit("%s: Error in automatically selecting device for input %s\n", + err_exit("%s: Error in automatically selecting CD-image driver for input %s\n", program_name, source_name); } break;