From b44553733d764bf39f891c63fba43eaf4ac90907 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 23 Sep 2006 13:26:42 +0000 Subject: [PATCH] Removed a bug with SCSI address of scanned drives without such address --- trunk/cdrskin/cdrskin.c | 9 ++++++--- trunk/cdrskin/cdrskin_timestamp.h | 2 +- trunk/libburn/drive.c | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/trunk/cdrskin/cdrskin.c b/trunk/cdrskin/cdrskin.c index d3247290..3ffc7a15 100644 --- a/trunk/cdrskin/cdrskin.c +++ b/trunk/cdrskin/cdrskin.c @@ -2757,9 +2757,12 @@ int Cdrskin_driveno_to_btldev(struct CdrskiN *skin, int driveno, {ret= 2; goto adr_translation;} } fallback:; - if(skin->preskin->no_pseudo_scsi_adr) - sprintf(btldev,"%d",driveno); - else + if(skin->preskin->no_pseudo_scsi_adr) { + if(loc!=NULL) + strcpy(btldev,loc); + else + sprintf(btldev,"%d",driveno); + } else sprintf(btldev,"0,%d,0",driveno); ret= 0; diff --git a/trunk/cdrskin/cdrskin_timestamp.h b/trunk/cdrskin/cdrskin_timestamp.h index 557a4932..9ffcaefc 100644 --- a/trunk/cdrskin/cdrskin_timestamp.h +++ b/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.09.23.114858" +#define Cdrskin_timestamP "2006.09.23.132755" diff --git a/trunk/libburn/drive.c b/trunk/libburn/drive.c index 4cf91656..40c63a1f 100644 --- a/trunk/libburn/drive.c +++ b/trunk/libburn/drive.c @@ -766,6 +766,9 @@ int burn_drive_obtain_scsi_adr(char *path, int *host_no, int *channel_no, *channel_no = drive_array[i].channel; *target_no = drive_array[i].id; *lun_no = drive_array[i].lun; + if (*host_no < 0 || *channel_no < 0 || + *target_no < 0 || *lun_no < 0) + return 0; return 1; } }