mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
document virCommandRunRegex function
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
eebe58adeb
commit
e7aa45055c
@ -2889,12 +2889,25 @@ virCommandSetDryRun(virBufferPtr buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
/*
|
/**
|
||||||
|
* virCommandRunRegex:
|
||||||
|
* @cmd: command to run
|
||||||
|
* @nregex: number of regexes to apply
|
||||||
|
* @regex: array of regexes to apply
|
||||||
|
* @nvars: array of numbers of variables each regex will produce
|
||||||
|
* @func: callback function that is called for every line of output,
|
||||||
|
* needs to return 0 on success
|
||||||
|
* @data: additional data that will be passed to the callback function
|
||||||
|
* @prefix: prefix that will be skipped at the beginning of each line
|
||||||
|
*
|
||||||
* Run an external program.
|
* Run an external program.
|
||||||
*
|
*
|
||||||
* Read its output and apply a series of regexes to each line
|
* Read its output and apply a series of regexes to each line
|
||||||
* When the entire set of regexes has matched consecutively
|
* When the entire set of regexes has matched consecutively
|
||||||
* then run a callback passing in all the matches
|
* then run a callback passing in all the matches on the current line.
|
||||||
|
*
|
||||||
|
* Returns: 0 on success, -1 on memory allocation error, virCommandRun
|
||||||
|
* error or callback function error
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
virCommandRunRegex(virCommandPtr cmd,
|
virCommandRunRegex(virCommandPtr cmd,
|
||||||
|
Loading…
Reference in New Issue
Block a user