Avoided to enumerate faulty drive objects
This commit is contained in:
parent
282fdab6b1
commit
3013dd0856
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2009.06.02.162841"
|
#define Cdrskin_timestamP "2009.06.02.172201"
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user