Made burn_drive_scan() refuse work on non-empty drive list.

This commit is contained in:
2007-09-07 15:50:31 +00:00
parent 5283401fb0
commit 8e171c89a6
5 changed files with 12 additions and 6 deletions

View File

@ -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(); */