New API call Xorriso_fetch_outlists()

This commit is contained in:
2012-09-11 09:28:05 +00:00
parent 9e887a3d0f
commit 7515b023c8
7 changed files with 230 additions and 35 deletions

View File

@ -25,6 +25,7 @@
#include <sys/time.h>
#include <time.h>
#include <errno.h>
#include <pthread.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
@ -317,6 +318,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->info_msglists[i]= NULL;
m->msglist_flags[i]= 0;
}
m->lib_msg_queue_lock_ini= 0;
m->result_msglists_lock_ini= 0;
m->msglist_stackfill= 0;
m->status_history_max= Xorriso_status_history_maX;
m->scsi_log= 0;
@ -433,6 +436,14 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
if(ret <= 0)
goto failure;
Xorriso_preparer_string(m, m->preparer_id, 1); /* avoids library calls */
ret= pthread_mutex_init(&(m->lib_msg_queue_lock), NULL);
if(ret != 0)
goto failure;
m->lib_msg_queue_lock_ini= 1;
ret= pthread_mutex_init(&(m->result_msglists_lock), NULL);
if(ret != 0)
goto failure;
m->result_msglists_lock_ini= 1;
if(leafname != NULL)
free(leafname);
@ -513,7 +524,11 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag)
for(i= 0; i < Xorriso_max_appended_partitionS; i++)
if(m->appended_partitions[i] != NULL)
free(m->appended_partitions[i]);
if(m->lib_msg_queue_lock_ini)
pthread_mutex_destroy(&(m->lib_msg_queue_lock));
if(m->result_msglists_lock_ini)
pthread_mutex_destroy(&(m->result_msglists_lock));
Xorriso_detach_libraries(m, flag&1);
free((char *) m);