Avoided to enumerate faulty drive objects

This commit is contained in:
Thomas Schmitt 2009-06-02 17:21:43 +00:00
parent 8276611468
commit 2522bebfbd
2 changed files with 9 additions and 5 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2009.06.02.162841" #define Cdrskin_timestamP "2009.06.02.172201"

View File

@ -930,7 +930,7 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
*/ */
unsigned char scanned[32]; unsigned char scanned[32];
unsigned count = 0; unsigned count = 0;
int i; int i, ret;
/* ts A61007 : moved up to burn_drive_scan() */ /* ts A61007 : moved up to burn_drive_scan() */
/* a ssert(burn_running); */ /* a ssert(burn_running); */
@ -994,11 +994,15 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
} }
*/ */
/* ts A90602 : A single call shall do (rather than a loop) */ /* ts A90602 : A single call shall do (rather than a loop) */
drive_getcaps(&drive_array[i], &(*drives)[*n_drives]); ret = drive_getcaps(&drive_array[i], &(*drives)[*n_drives]);
if (ret > 0)
(*n_drives)++; (*n_drives)++;
scanned[i / 8] |= 1 << (i % 8); scanned[i / 8] |= 1 << (i % 8);
} }
if (*drives != NULL && *n_drives == 0) {
free ((char *) *drives);
*drives = NULL;
}
return(1); return(1);
} }