|
|
|
@ -583,15 +583,16 @@ int Xorriso_process_errfile(struct XorrisO *xorriso,
|
|
|
|
|
int flag);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* -------------------- Message output evaluation API -------------------- */
|
|
|
|
|
/*
|
|
|
|
|
Message output evaluation
|
|
|
|
|
|
|
|
|
|
/* xorriso is basically a dialog software which reacts on commands by
|
|
|
|
|
xorriso is basically a dialog software which reacts on commands by
|
|
|
|
|
side effects and by messages. The side effects manipulate the state of
|
|
|
|
|
the ISO image model and of drives. This state can be inquired by commands
|
|
|
|
|
which emit messages.
|
|
|
|
|
|
|
|
|
|
There are several API approaches how a program can receive and use the
|
|
|
|
|
message output of xorriso.
|
|
|
|
|
There are several approaches how a program that uses xorriso via this API
|
|
|
|
|
can receive and use the message output of xorriso.
|
|
|
|
|
|
|
|
|
|
- The message sieve may be programmed to pick certain information snippets
|
|
|
|
|
out of the visible message stream. This covers all messages on the
|
|
|
|
@ -611,17 +612,27 @@ int Xorriso_process_errfile(struct XorrisO *xorriso,
|
|
|
|
|
All interpretation of the messages has to be done by the user of the
|
|
|
|
|
xorriso API. Function Xorriso_parse_line() is intended to help with
|
|
|
|
|
splitting up messages into words.
|
|
|
|
|
The outlist stack is handy for catching the result channel of information
|
|
|
|
|
commands with large uniform output like -lsl, -getfacl, -status.
|
|
|
|
|
The outlist stack is handy for catching the results of information
|
|
|
|
|
commands with large uniform output or no well recognizable message
|
|
|
|
|
prefix. Like -lsl, -getfacl, -status, -find ... -exec get_md5.
|
|
|
|
|
One should push the stack before the command, pull it afterwards, examine
|
|
|
|
|
the text list by Xorriso_lst_get_*(), and finally dispose the list.
|
|
|
|
|
|
|
|
|
|
- The message watcher is a separate program thread which uses the outlist
|
|
|
|
|
stack to catch the messages and to call user provided handler functions.
|
|
|
|
|
These functions can use Xorriso_parse_line() too, if they submit the
|
|
|
|
|
xorriso parameter as NULL.
|
|
|
|
|
xorriso parameter as NULL. They may not use the struct XorrisO object
|
|
|
|
|
in any way.
|
|
|
|
|
Synchronization between watcher and emitters of commands can be achived
|
|
|
|
|
by Xorriso_peek_outlists().
|
|
|
|
|
The main motivation for the message watcher is to inspect and display
|
|
|
|
|
messages of long lasting xorriso commands like -commit, -blank, -format.
|
|
|
|
|
messages of long lasting xorriso commands while they are still executing.
|
|
|
|
|
E.g. of -commit, -blank, -format.
|
|
|
|
|
One would normally start it before such a command and stop it afterwards.
|
|
|
|
|
But of course, the watcher can stay activated all the time and process
|
|
|
|
|
all message output via its handler calls.i
|
|
|
|
|
|
|
|
|
|
The sieve does not interfere with outlists and message watcher.
|
|
|
|
|
The message sieve does not interfere with outlists and message watcher.
|
|
|
|
|
The message watcher will only see messages which are not caught by outlists
|
|
|
|
|
which were enabled after the watcher thread was started.
|
|
|
|
|
|
|
|
|
@ -691,6 +702,10 @@ int Xorriso_sieve_add_filter(struct XorrisO *xorriso, char *name,
|
|
|
|
|
Do not allocate memory.
|
|
|
|
|
bit2= If *argv is not NULL, then free it before attaching
|
|
|
|
|
new memory.
|
|
|
|
|
@return <0 error: -1 = memor shortage
|
|
|
|
|
-2 = no filter rule found
|
|
|
|
|
0 no more data available for the given name
|
|
|
|
|
>0 argc and argv are valid
|
|
|
|
|
*/
|
|
|
|
|
int Xorriso_sieve_get_result(struct XorrisO *xorriso, char *name,
|
|
|
|
|
int *argc, char ***argv, int *available,
|
|
|
|
@ -763,6 +778,18 @@ int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag);
|
|
|
|
|
"Ext. filters :" up to 1 result from -list_extras
|
|
|
|
|
argv[0]= "yes" or "no" , possibly more info
|
|
|
|
|
(Note: prefix is "Ext. filters : ")
|
|
|
|
|
"File damaged :" up to 10000 results from -find ... -exec report_damage
|
|
|
|
|
argv[0]= damage start byte in file
|
|
|
|
|
argv[1]= damage range size in file
|
|
|
|
|
argv[2]= file size
|
|
|
|
|
argv[3]= path in ISO image
|
|
|
|
|
"File data lba:" up to 10000 results from -find ... -exec report_lba
|
|
|
|
|
argv[0]= extent number (all extents of same path together
|
|
|
|
|
are the content of one file)
|
|
|
|
|
argv[1]= start block number of extent
|
|
|
|
|
argv[2]= number of blocks of extent
|
|
|
|
|
argv[3]= overall file content size in all extents
|
|
|
|
|
argv[4]= path in ISO image
|
|
|
|
|
"Format idx :" up to 100 results from -list_formats
|
|
|
|
|
argv[0]= index
|
|
|
|
|
argv[1]= MMC code
|
|
|
|
@ -785,6 +812,8 @@ int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag);
|
|
|
|
|
argv[0]= "yes" or "no"
|
|
|
|
|
"Local xattr :" up to 1 result from -list_extras
|
|
|
|
|
argv[0]= "yes" or "no"
|
|
|
|
|
"MD5 MISMATCH:" up to 10000 results from -check_md5*
|
|
|
|
|
argv[0]= path of mismatching file
|
|
|
|
|
"MD5 tag range:" up to 10000 results from -check_media
|
|
|
|
|
argv[0]= lba
|
|
|
|
|
argv[1]= size in blocks
|
|
|
|
@ -826,6 +855,10 @@ int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag);
|
|
|
|
|
(Note: prefix is "Publisher Id : ")
|
|
|
|
|
"Readline :" up to 1 result from -list_extras
|
|
|
|
|
argv[0]= "yes" or "no"
|
|
|
|
|
"Size lower :" up to 1 result from -findx ... -exec estimate_size
|
|
|
|
|
argv[0]= size with appended "s"
|
|
|
|
|
"Size upper :" up to 1 result from -findx ... -exec estimate_size
|
|
|
|
|
argv[0]= size with appended "s"
|
|
|
|
|
"System Id :" up to 1 result from -pvd_info
|
|
|
|
|
argv[0]= id
|
|
|
|
|
(Note: prefix is "System Id : ")
|
|
|
|
|