]> xenbits.xensource.com Git - libvirt.git/commit
virlog: Refactor virLogParseOutputs
authorErik Skultety <eskultet@redhat.com>
Tue, 15 Mar 2016 21:15:02 +0000 (22:15 +0100)
committerErik Skultety <eskultet@redhat.com>
Wed, 16 Mar 2016 13:28:24 +0000 (14:28 +0100)
commit0b231195cb5be7d0c92b5d8164b222a4e0b9f287
tree66596a02a55931fd310b3ab556f1413b79ce34b5
parent034337fb8578d6f67455782b7a5ee67c67ff7000
virlog: Refactor virLogParseOutputs

The problem with the original virLogParseOutputs method was that the way it
parsed the input, walking the string char by char and using absolute jumps
depending on the virLogDestination type, was rather complicated to read.
This patch utilizes virStringSplit method twice, first time to filter out any
spaces and split the input to individual log outputs and then for each
individual output to tokenize it by to the parts according to our
PRIORITY:DESTINATION?(:DATA) format. Also, to STREQLEN for matching destination
was replaced with virDestinationTypeFromString call.
po/POTFILES.in
src/util/virlog.c