Even though this may not be nstrictly the way the original

cdda_interface does things, add a spaces between the vendor, model,
and revison number.
This commit is contained in:
rocky
2005-01-19 17:24:58 +00:00
parent 17e0ce465d
commit 1b40bc3018

View File

@@ -1,5 +1,5 @@
/* /*
$Id: scan_devices.c,v 1.13 2005/01/18 03:03:56 rocky Exp $ $Id: scan_devices.c,v 1.14 2005/01/19 17:24:58 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
Copyright (C) 1998 Monty xiphmont@mit.edu Copyright (C) 1998 Monty xiphmont@mit.edu
@@ -254,18 +254,18 @@ cdda_identify_cooked(const char *dev, int messagedest, char **messages)
if ( scsi_mmc_get_hwinfo( p_cdio, &hw_info ) ) { if ( scsi_mmc_get_hwinfo( p_cdio, &hw_info ) ) {
unsigned int i_len = strlen(hw_info.psz_vendor) unsigned int i_len = strlen(hw_info.psz_vendor)
+ strlen(hw_info.psz_model) + strlen(hw_info.psz_model)
+ strlen(hw_info.psz_revision) + 3; + strlen(hw_info.psz_revision) + 5;
if (description) { if (description) {
i_len += strlen(description); i_len += strlen(description);
d->drive_model=malloc( i_len ); d->drive_model=malloc( i_len );
snprintf( d->drive_model, i_len, "%s%s%s %s", snprintf( d->drive_model, i_len, "%s %s %s %s",
hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision, hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision,
description ); description );
free(description); free(description);
} else { } else {
d->drive_model=malloc( i_len ); d->drive_model=malloc( i_len );
snprintf( d->drive_model, i_len, "%s%s%s", snprintf( d->drive_model, i_len, "%s %s %s",
hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision
); );
} }