INCOMPATIBLE API CHANGE: isoburn_initialize(char msg[1024], int flag)
This commit is contained in:
parent
7229e2949c
commit
b3551cc611
@ -47,12 +47,25 @@
|
||||
extern struct isoburn *isoburn_list_start; /* in isoburn.c */
|
||||
|
||||
|
||||
int isoburn_initialize(void)
|
||||
int isoburn_initialize(char msg[1024], int flag)
|
||||
{
|
||||
if(iso_init()<0)
|
||||
int major, minor, micro;
|
||||
|
||||
msg[0]= 0;
|
||||
if(iso_init()<0) {
|
||||
sprintf(msg+strlen(msg), "Cannot initialize libisofs\n");
|
||||
return(0);
|
||||
if(!burn_initialize())
|
||||
}
|
||||
iso_lib_version(&major, &minor, µ);
|
||||
sprintf(msg+strlen(msg), "libisofs version %d.%d.%d , ", major, minor, micro);
|
||||
|
||||
if(!burn_initialize()) {
|
||||
sprintf(msg+strlen(msg), "Cannot initialize libburn\n");
|
||||
return(0);
|
||||
}
|
||||
burn_version(&major, &minor, µ);
|
||||
sprintf(msg+strlen(msg), "libburn version %d.%d.%d , ", major, minor, micro);
|
||||
|
||||
isoburn_destroy_all(&isoburn_list_start, 0); /* isoburn_list_start= NULL */
|
||||
|
||||
return(1);
|
||||
|
@ -42,9 +42,11 @@ are appropriate for particular target "drives".
|
||||
|
||||
/** Initialize libisoburn, libisofs and libburn.
|
||||
Wrapper for : iso_init() and burn_initialize()
|
||||
@param reason A character array for eventual messages (e.g. with errors)
|
||||
@param flag Bitfield for control purposes (unused yet, submit 0)
|
||||
@return 1 indicates success, 0 is failure
|
||||
*/
|
||||
int isoburn_initialize(void);
|
||||
int isoburn_initialize(char msg[1024], int flag);
|
||||
|
||||
|
||||
/** Aquire a target drive by its filesystem path resp. libburn persistent
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.01.26.002011"
|
||||
#define Xorriso_timestamP "2008.01.26.113604"
|
||||
|
@ -78,7 +78,7 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret;
|
||||
char *handler_prefix= NULL;
|
||||
char *queue_sev, *print_sev;
|
||||
char *queue_sev, *print_sev, reason[1024];
|
||||
|
||||
sprintf(xorriso->info_text, "Starting up libraries ...\n");
|
||||
Xorriso_info(xorriso, 0);
|
||||
@ -90,14 +90,25 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||
return(-1);
|
||||
}
|
||||
ret= isoburn_initialize();
|
||||
reason[0]= 0;
|
||||
ret= isoburn_initialize(reason, 0);
|
||||
if(ret==0) {
|
||||
sprintf(xorriso->info_text, "Cannot initialize libraries");
|
||||
if(reason[0])
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
||||
". Reason given:\n%s", reason);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||
free(handler_prefix);
|
||||
return(0);
|
||||
}
|
||||
|
||||
if(reason[0]) {
|
||||
sprintf(xorriso->info_text, "%s", reason);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
}
|
||||
|
||||
xorriso->libs_are_started= 1;
|
||||
|
||||
|
||||
queue_sev= "DEBUG";
|
||||
if(xorriso->library_msg_direct_print) {
|
||||
@ -666,15 +677,9 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
progress.sector, progress.sectors);
|
||||
ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text);
|
||||
if(ret>0 )
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
||||
" [fifo %s, %2d%% fill, size=%d , free=%d]", status_text,
|
||||
(int) (100.0-100.0*((double) free_bytes)/(double) size),
|
||||
size, free_bytes);
|
||||
/*
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
||||
" [fifo %s, %2d%% fill]", status_text,
|
||||
(int) (100.0-100.0*((double) free_bytes)/(double) size));
|
||||
*/
|
||||
} else if(drive_status == BURN_DRIVE_CLOSING_SESSION ||
|
||||
drive_status == BURN_DRIVE_CLOSING_TRACK)
|
||||
sprintf(xorriso->info_text,
|
||||
|
Loading…
Reference in New Issue
Block a user