]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Run devicePostParse() again for the first serial device
authorAndrea Bolognani <abologna@redhat.com>
Wed, 8 Nov 2017 16:40:13 +0000 (17:40 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 28 Nov 2017 14:46:31 +0000 (15:46 +0100)
commit2628afc143224d38e6ef8c06a8fbec1d0f69fb86
tree670a24167a48aa7ddc0863807081f02f68373d14
parentf4b50cc1b994e44c793f4dea59489ba51e2d1fe0
conf: Run devicePostParse() again for the first serial device

The devicePostParse() callback is invoked for all devices so that
drivers have a chance to set their own specific values; however,
virDomainDefAddImplicitDevices() runs *after* the devicePostParse()
callbacks have been invoked and can add new devices, in which case
the driver wouldn't have a chance to customize them.

Work around the issue by invoking the devicePostParse() callback
after virDomainDefAddImplicitDevices(), only for the first serial
devices, which might have been added by it. The same was already
happening for the first video device for the very same reason.

This will become important later on, when we will change
virDomainDefAddConsoleCompat() not to set a targetType for
automatically added serial devices.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/domain_conf.c