]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Propagate numad failures correctly
authorAndrea Bolognani <abologna@redhat.com>
Mon, 3 Jun 2019 16:45:27 +0000 (18:45 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 4 Jun 2019 08:13:07 +0000 (10:13 +0200)
commitb34fb1fb6f99628932ad68db1ce4985a06def17f
tree330737ce8ab8a84106593655b4682458c6a44dbb
parent5f2212c062c720716b7701fa0a5511311dc6e906
util: Propagate numad failures correctly

Right now, if numad fails, we raise an error but return an
empty string to the caller instead of a NULL pointer, which
means processing will continue and the user will see

  # virsh start guest
  error: Failed to start domain guest
  error: invalid argument: Failed to parse bitmap ''

instead of a more reasonable

  # virsh start guest
  error: Failed to start domain guest
  error: operation failed: Failed to query numad for the advisory nodeset

Make sure the user gets a better error message.

https://bugzilla.redhat.com/show_bug.cgi?id=1716387

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virnuma.c