]> xenbits.xensource.com Git - libvirt.git/commit
virbitmap: Introduce virBitmapParseUnlimitedAllowEmpty()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Apr 2024 07:17:51 +0000 (09:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 6 May 2024 13:26:58 +0000 (15:26 +0200)
commitb972cdc1a5716d9f9ae27eb20142166356a12bc0
tree3f56141de6f7d55e2d00095e5a00e9ac7dd82ad4
parent142ed263c03e1fee3b1c7bc6016950c6429f0bba
virbitmap: Introduce virBitmapParseUnlimitedAllowEmpty()

Some sysfs files contain either string representation of a bitmap
or just a newline character. An example of such file is:
/sys/devices/system/cpu/isolated. Our current implementation of
virBitmapParseUnlimited() fails in the latter case,
unfortunately. Introduce a slightly modified version that accepts
empty files.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/libvirt_private.syms
src/util/virbitmap.c
src/util/virbitmap.h
tests/virbitmaptest.c