]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virfile: Introduce virFileReadValueBitmapAllowEmpty()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Apr 2024 08:41:50 +0000 (10:41 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 6 May 2024 13:29:36 +0000 (15:29 +0200)
commitf3c6c7623c5a03d7090f7064b87fe467f8d0a656
tree60629b27d7c85bc4261e697058dfe3ac47d8bf26
parentb972cdc1a5716d9f9ae27eb20142166356a12bc0
virfile: Introduce virFileReadValueBitmapAllowEmpty()

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
virFileReadValueBitmap() 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/virfile.c
src/util/virfile.h