Improved -check_media with overwritable media and unknown content

master
Thomas Schmitt 11 years ago
parent 8a67604efc
commit 076d8d1eb8
  1. 30
      xorriso/drive_mgt.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -2349,7 +2349,7 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
} else if(mode == 0) { /* track by track */
isoburn_disc= isoburn_toc_drive_get_disc(drive);
if(isoburn_disc == NULL)
goto no_content_visible;
goto libburn_whole_disc;
isoburn_sessions=
isoburn_toc_disc_get_sessions(isoburn_disc, &num_sessions);
for(i= 0; i < num_sessions; i++) {
@ -2420,27 +2420,33 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
} else if(mode == 1) { /* isoburn disc capacity */
isoburn_disc= isoburn_toc_drive_get_disc(drive);
if(isoburn_disc == NULL) {
no_content_visible:;
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "No content detected on media");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
if(isoburn_disc == NULL)
goto libburn_whole_disc;
blocks= media_blocks= isoburn_toc_disc_get_sectors(isoburn_disc);
if(start_lba >= 0)
blocks-= start_lba;
if(media_blocks <= 0)
goto no_content_visible;
goto libburn_whole_disc;
xorriso->pacifier_total= blocks;
ret= Xorriso_check_interval(xorriso, *spotlist, job, start_lba, blocks,
read_chunk, 0, 0);
if(ret <= 0)
goto ex;
} else if(mode == 2) {
/* >>> single sweep over libburn media capacity */;
libburn_whole_disc:;
/* single sweep over libburn media capacity */
ret= burn_get_read_capacity(drive, &blocks, 0);
if(ret <= 0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "No content detected on media");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
xorriso->pacifier_total= blocks;
ret= Xorriso_check_interval(xorriso, *spotlist, job, 0, blocks,
read_chunk, 0, 0);
if(ret <= 0)
goto ex;
}
Xorriso_pacifier_callback(xorriso, "sectors examined",

@ -1 +1 @@
#define Xorriso_timestamP "2011.07.24.193433"
#define Xorriso_timestamP "2011.07.24.203919"

Loading…
Cancel
Save