Adapted to libisofs revision 261
This commit is contained in:
parent
8ad70686e4
commit
68e8342e44
@ -50,6 +50,8 @@ extern struct isoburn *isoburn_list_start; /* in isoburn.c */
|
||||
|
||||
int isoburn_initialize(void)
|
||||
{
|
||||
if(iso_init()<0)
|
||||
return(0);
|
||||
if(!burn_initialize())
|
||||
return(0);
|
||||
isoburn_destroy_all(&isoburn_list_start, 0); /* isoburn_list_start= NULL */
|
||||
@ -364,6 +366,7 @@ void isoburn_finish(void)
|
||||
{
|
||||
isoburn_destroy_all(&isoburn_list_start, 0);
|
||||
burn_finish();
|
||||
iso_finish();
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,9 +112,7 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
|
||||
} else
|
||||
print_sev= "NEVER";
|
||||
|
||||
/* >>> NG How to set severities before isoburn_read_image() ?
|
||||
iso_image_set_msgs_severities() demands an IsoImage
|
||||
*/
|
||||
iso_set_msgs_severities(queue_sev, print_sev, "libsofs : ");
|
||||
burn_msgs_set_severities(queue_sev, print_sev, "libburn : ");
|
||||
|
||||
/* ??? >>> do we want united queues ? */
|
||||
@ -171,13 +169,10 @@ int Xorriso_get_drive_handles(struct XorrisO *xorriso,
|
||||
|
||||
|
||||
/* @param flag bit0= suppress DEBUG messages */
|
||||
int Xorriso_set_image_severities(struct XorrisO *xorriso, IsoImage *volset,
|
||||
int flag)
|
||||
int Xorriso_set_image_severities(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
char *queue_sev, *print_sev;
|
||||
|
||||
if(volset==NULL)
|
||||
return(0);
|
||||
if(flag&1)
|
||||
queue_sev= "UPDATE";
|
||||
else
|
||||
@ -186,7 +181,7 @@ int Xorriso_set_image_severities(struct XorrisO *xorriso, IsoImage *volset,
|
||||
print_sev= xorriso->report_about_text;
|
||||
else
|
||||
print_sev= "NEVER";
|
||||
iso_image_set_msgs_severities(volset, queue_sev, print_sev, "libisofs : ");
|
||||
iso_set_msgs_severities(queue_sev, print_sev, "libisofs : ");
|
||||
return(1);
|
||||
}
|
||||
|
||||
@ -235,7 +230,6 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
|
||||
return(-1);
|
||||
}
|
||||
xorriso->in_volset_handle= (void *) volset;
|
||||
Xorriso_set_image_severities(xorriso, volset, 0);
|
||||
Xorriso_update_volid(xorriso, 0);
|
||||
xorriso->volset_change_pending= 0;
|
||||
return(1);
|
||||
@ -314,7 +308,6 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
if(flag&1) {
|
||||
volset= isoburn_get_attached_image(drive);
|
||||
if(volset != NULL) { /* The image object is already created */
|
||||
Xorriso_set_image_severities(xorriso, volset, 0);
|
||||
iso_image_unref(volset);
|
||||
}
|
||||
}
|
||||
@ -377,16 +370,16 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
ropts.input_charset= NULL;
|
||||
ropts.pretend_blank= 0;
|
||||
|
||||
Xorriso_set_image_severities(xorriso, volset, 1); /* No DEBUG messages */
|
||||
Xorriso_set_image_severities(xorriso, 1); /* No DEBUG messages */
|
||||
if(isoburn_read_image(drive, &ropts, &volset) <= 0) {
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
Xorriso_set_image_severities(xorriso, volset, 0);
|
||||
Xorriso_set_image_severities(xorriso, 0);
|
||||
sprintf(xorriso->info_text,"Cannot read ISO image volset");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||
ret= 3; goto ex;
|
||||
}
|
||||
xorriso->in_volset_handle= (void *) volset;
|
||||
Xorriso_set_image_severities(xorriso, volset, 0);
|
||||
Xorriso_set_image_severities(xorriso, 0);
|
||||
Xorriso_update_volid(xorriso, 0);
|
||||
|
||||
if(xorriso->out_drive_handle != NULL &&
|
||||
@ -1331,22 +1324,16 @@ int Xorriso__text_to_sev(char *severity_name, int *severity_number, int flag)
|
||||
|
||||
int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret, error_code= 0, os_errno= 0, count= 0, pass, start_pass= 0;
|
||||
int ret, error_code= 0, os_errno= 0, count= 0, pass;
|
||||
char severity[80];
|
||||
IsoImage *volume= NULL;
|
||||
|
||||
if(xorriso->in_volset_handle==NULL)
|
||||
start_pass= 1;
|
||||
else
|
||||
volume= (IsoImage *) xorriso->in_volset_handle;
|
||||
|
||||
if(!xorriso->libs_are_started)
|
||||
return(1);
|
||||
for(pass= start_pass; pass< 2; pass++) {
|
||||
for(pass= 0; pass< 2; pass++) {
|
||||
while(1) {
|
||||
if(pass==0)
|
||||
ret= iso_image_obtain_msgs(volume, "ALL", &error_code,
|
||||
xorriso->info_text, &os_errno, severity);
|
||||
ret= iso_obtain_msgs("ALL", &error_code,
|
||||
xorriso->info_text, &os_errno, severity);
|
||||
else
|
||||
ret= burn_msgs_obtain("ALL", &error_code, xorriso->info_text, &os_errno,
|
||||
severity);
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.01.22.224321"
|
||||
#define Xorriso_timestamP "2008.01.23.195855"
|
||||
|
Loading…
Reference in New Issue
Block a user