>From 01a3ed1e6bacba8cd9f398e5233960714b2c4f49 Mon Sep 17 00:00:00 2001 From: Christian Loehle <cloehle@xxxxxxxxxxxxx> Date: Mon, 23 Nov 2015 15:06:37 +0100 Subject: [PATCH] =?UTF-8?q?document=20virCommandRunRegex=20function=C3=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/vircommand.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index c7f1538..a88cc13 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -2889,12 +2889,24 @@ virCommandSetDryRun(virBufferPtr buf, } #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 + * @exitstatus: 0 on success, -1 on memory allocation error, virCommandRun + * error or callback function error + * * Run an external program. * * Read its output and apply a series of regexes to each line * 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 of the current line. */ int virCommandRunRegex(virCommandPtr cmd, -- 2.1.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list