Ticket 91: update media state model after content change

This commit is contained in:
2006-11-25 15:26:35 +00:00
parent 13214d9ac5
commit 56ab215db0
4 changed files with 74 additions and 69 deletions

View File

@ -25,8 +25,6 @@
libburner_aquire_by_driveno() demonstrates a scan-and-choose approach
With that aquired drive you can blank a CD-RW
libburner_blank_disc()
Between blanking and burning one eventually has to reload the drive status
libburner_regrab()
With the aquired drive you can burn to CD-R or blank CD-RW
libburner_payload()
When everything is done, main() releases the drive and shuts down libburn:
@ -287,27 +285,6 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
}
/** This gesture is necessary to get the drive info after blanking.
It opens a small gap for losing the drive to another libburn instance.
We will work on closing this gap.
*/
int libburner_regrab(struct burn_drive *drive) {
int ret;
printf("Releasing and regrabbing drive ...\n");
if (drive_is_grabbed)
burn_drive_release(drive, 0);
drive_is_grabbed = 0;
ret = burn_drive_grab(drive, 0);
if (ret != 0) {
drive_is_grabbed = 1;
printf("Done\n");
} else
printf("FAILED\n");
return !!ret;
}
/** Brings preformatted track images (ISO 9660, audio, ...) onto media.
To make sure a data image is fully readable on any Linux machine, this
function adds 300 kB of padding to the (usualy single) track.
@ -606,13 +583,6 @@ int main(int argc, char **argv)
do_blank == 1);
if (ret<=0)
{ ret = 36; goto release_drive; }
if (ret != 2 && source_adr_count > 0)
ret = libburner_regrab(drive_list[driveno].drive);
if (ret<=0) {
fprintf(stderr,
"FATAL: Cannot release and grab again drive after blanking\n");
{ ret = 37; goto finish_libburn; }
}
}
if (source_adr_count > 0) {
ret = libburner_payload(drive_list[driveno].drive,