]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: forbid negative number in address(like controller, bus, slot...)
authorLuyao Huang <lhuang@redhat.com>
Mon, 8 Dec 2014 08:27:26 +0000 (16:27 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Dec 2014 10:35:27 +0000 (11:35 +0100)
commita23fefdf461c98c98e32e61440df96cf5dd43a51
treebbf154335a8a6dc3d90433ad1a5a05ebc830835f
parent2bdcd29c713dfedd813c89f56ae98f6f3898313d
conf: forbid negative number in address(like controller, bus, slot...)

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

When we edit a negative controller address number to a device,
some of them will auto generate a controller with invalid index
number. This will make guest disappear after restart libvirtd.
Instead of allowing negative number for controller index, we
should forbid negative number in these place (we did this before,
but after f18c02ec, virStrToLong_ui changed to allow negative
number). Therefore switch to virStrToLong_uip in these places.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/device_conf.c
src/conf/domain_conf.c