]> xenbits.xensource.com Git - libvirt.git/commit
conf: simplify logic when checking for AUTOASSIGN PCI addresses
authorLaine Stump <laine@redhat.com>
Sun, 5 Apr 2020 22:01:43 +0000 (18:01 -0400)
committerLaine Stump <laine@redhat.com>
Mon, 13 Apr 2020 02:38:27 +0000 (22:38 -0400)
commitfcdf87d3ef14de9dfb0acaf4b4445e1580dfc629
tree8c27a12c829d44a07e52b8010c0f2885c82912f6
parent7c98f5e3652e19e4eb015d290c1eed2f1b58ee72
conf: simplify logic when checking for AUTOASSIGN PCI addresses

Old behavior: If the address was manually provided by config, copy
device AUTOASSIGN flag into the bus flag, and then later on in the
function *always* check for a match of the flags (which will always
match if the address came from config, since we just copied it).

New behavior: Don't mess with the bus flags - just directly check if
the AUTOASSIGN flag matches in bus and dev, but only make the check if
the address didn't come from config (i.e. it was auto-assigned by
libvirt).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_addr.c