Made burn_drive_scan() refuse work on non-empty drive list.
This commit is contained in:
@ -445,7 +445,8 @@ void burn_drive_release(struct burn_drive *d, int le)
|
||||
|
||||
|
||||
/* ts A61007 : former void burn_wait_all() */
|
||||
int burn_drives_are_clear(void)
|
||||
/* @param flag bit0= demand freed drives (else released drives) */
|
||||
int burn_drives_are_clear(int flag)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -453,7 +454,7 @@ int burn_drives_are_clear(void)
|
||||
/* ts A60904 : ticket 62, contribution by elmom */
|
||||
if (drive_array[i].global_index == -1)
|
||||
continue;
|
||||
if (drive_array[i].released)
|
||||
if (drive_array[i].released && !(flag & 1))
|
||||
continue;
|
||||
return 0;
|
||||
}
|
||||
@ -798,6 +799,9 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
|
||||
state */
|
||||
#endif /* 0 */
|
||||
|
||||
/* ts A70907 : moved here from burn_drive_info_free() */
|
||||
burn_drive_free_all();
|
||||
|
||||
/* refresh the lib's drives */
|
||||
|
||||
/* ts A61115 : formerly sg_enumerate(); ata_enumerate(); */
|
||||
|
Reference in New Issue
Block a user