]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Improve CPU frequency parsing
authorAndrea Bolognani <abologna@redhat.com>
Mon, 11 Dec 2017 14:32:49 +0000 (15:32 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 8 Jan 2018 12:48:44 +0000 (13:48 +0100)
commit6512b0ddc1eb32807e0b453ce83d243ae5837193
treee9593e01428003672d643363c81e6706af20c1fd
parent5e07b28a7a385da96540a809acd8853d3876ebfd
util: Improve CPU frequency parsing

Make the parser both more strict, by not ignoring errors reported
by virStrToLong_ui(), and more permissive, by not failing due to
unrelated fields which just happen to have a know prefix and
accepting any amount of whitespace before the numeric value.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
src/util/virhostcpu.c
tests/virhostcpudata/linux-x86_64-test1.cpuinfo