From 5a515d9140a7a0dab4257785424eb39dfe3a6e7e Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 30 Apr 2005 07:15:51 +0000 Subject: [PATCH] Simplify endian determination - thanks to suggestions of Steve Schultz Remove recently added field is_scsi which isn't in cdparanoia --- include/cdio/cdda.h | 3 +-- lib/cdda_interface/interface.c | 8 ++------ lib/cdda_interface/scan_devices.c | 6 +----- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/include/cdio/cdda.h b/include/cdio/cdda.h index e39ca041..cb7a7d39 100644 --- a/include/cdio/cdda.h +++ b/include/cdio/cdda.h @@ -1,5 +1,5 @@ /* - $Id: cdda.h,v 1.20 2005/04/28 01:25:53 rocky Exp $ + $Id: cdda.h,v 1.21 2005/04/30 07:15:51 rocky Exp $ Copyright (C) 2004, 2005 Rocky Bernstein Copyright (C) 2001 Xiph.org @@ -113,7 +113,6 @@ struct cdrom_drive_s { int is_atapi; int is_mmc; - int is_scsi; int i_test_flags; /**< Normally set 0. But if we are testing paranoia operation this can be set to one of diff --git a/lib/cdda_interface/interface.c b/lib/cdda_interface/interface.c index 722707f6..731f08fc 100644 --- a/lib/cdda_interface/interface.c +++ b/lib/cdda_interface/interface.c @@ -1,5 +1,5 @@ /* - $Id: interface.c,v 1.23 2005/04/28 01:25:53 rocky Exp $ + $Id: interface.c,v 1.24 2005/04/30 07:15:51 rocky Exp $ Copyright (C) 2005 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu @@ -121,11 +121,7 @@ cdio_cddap_open(cdrom_drive_t *d) /* d->select_speed(d,d->maxspeed); most drives are full speed by default */ if ( -1 == d->bigendianp ) { - if (1 != d->is_scsi && yep == cdio_have_atapi(d->p_cdio)) - /* Is this right? */ - d->bigendianp = 1; - else - d->bigendianp = data_bigendianp(d); + d->bigendianp = data_bigendianp(d); } diff --git a/lib/cdda_interface/scan_devices.c b/lib/cdda_interface/scan_devices.c index 6948a3ab..0ff2147a 100644 --- a/lib/cdda_interface/scan_devices.c +++ b/lib/cdda_interface/scan_devices.c @@ -1,5 +1,5 @@ /* - $Id: scan_devices.c,v 1.27 2005/04/28 01:25:53 rocky Exp $ + $Id: scan_devices.c,v 1.28 2005/04/30 07:15:51 rocky Exp $ Copyright (C) 2004, 2005 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu @@ -211,7 +211,6 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device, { cdrom_drive_t *d=NULL; int drive_type = 0; - int is_scsi = -1; char *description=NULL; #ifdef HAVE_LINUX_MAJOR_H struct stat st; @@ -233,7 +232,6 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device, case IDE3_MAJOR: /* Yay, ATAPI... */ description=strdup("ATAPI compatible "); - is_scsi = 0; break; case CDU31A_CDROM_MAJOR: /* major indicates this is a cdrom; no ping necessary. */ @@ -275,7 +273,6 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device, case SCSI_GENERIC_MAJOR: /* Nope nope nope */ description=strdup("SCSI CD-ROM"); - is_scsi = 1; break; default: /* What the hell is this? */ @@ -294,7 +291,6 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device, d->p_cdio = p_cdio; d->cdda_device_name = strdup(psz_device); d->drive_type = drive_type; - d->is_scsi = is_scsi; d->bigendianp = -1; /* We don't know yet... */ d->nsectors = -1; /* We don't know yet... */ d->b_swap_bytes = true;