Various bugs and deviations around -as mkisofs -print-size

This commit is contained in:
Thomas Schmitt 2008-02-23 12:56:18 +00:00
parent 415aeb858f
commit 7706337168
2 changed files with 18 additions and 10 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.02.23.113902" #define Xorriso_timestamP "2008.02.23.125537"

View File

@ -393,12 +393,16 @@ int Xorriso_report_iso_error(struct XorrisO *xorriso, char *victim,
} }
/* @param flag bit0= suppress DEBUG messages */ /* @param flag bit0= suppress messages below DEBUG
bit1= suppress messages below FAILURE
*/
int Xorriso_set_image_severities(struct XorrisO *xorriso, int flag) int Xorriso_set_image_severities(struct XorrisO *xorriso, int flag)
{ {
char *queue_sev, *print_sev; char *queue_sev, *print_sev;
if(flag&1) if(flag&2)
queue_sev= "FAILURE";
else if(flag&1)
queue_sev= "UPDATE"; queue_sev= "UPDATE";
else else
queue_sev= "ALL"; queue_sev= "ALL";
@ -770,9 +774,7 @@ int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
struct burn_session **sessions; struct burn_session **sessions;
struct burn_track **tracks; struct burn_track **tracks;
ret= img_sectors= burn_disc_get_sectors(disc); img_sectors= burn_disc_get_sectors(disc);
if(flag&1)
goto ex;
sessions= burn_disc_get_sessions(disc, &num_sessions); sessions= burn_disc_get_sessions(disc, &num_sessions);
if(sessions==NULL || num_sessions < 1) { if(sessions==NULL || num_sessions < 1) {
@ -816,6 +818,9 @@ no_track:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
if(flag&1) {
ret= img_sectors+padding;
} else
ret= 1; ret= 1;
ex:; ex:;
return(ret); return(ret);
@ -971,12 +976,15 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
#ifndef NIX #ifndef NIX
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1); ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
if(ret<=0) { if(ret<=0 || (flag&1)) {
Xorriso_process_msg_queues(xorriso,0);
if(flag&1) /* set queue severity to FAILURE */
Xorriso_set_image_severities(xorriso, 2);
isoburn_cancel_prepared_write(source_drive, drive, 0); isoburn_cancel_prepared_write(source_drive, drive, 0);
if(flag&1) /* reset queue severity */
Xorriso_set_image_severities(xorriso, 0);
goto ex; goto ex;
} }
if(flag&1)
goto ex;
#else #else