mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 15:00:07 +00:00
qemu: hotplug: Validate definition of 'FS' device after address allocation
Some of the checks make sense only after the address is allocated and thus we need to re-do the validation after the address is assigned. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c249f909f3
commit
63b32dbe8b
@ -40,6 +40,7 @@
|
||||
#include "domain_audit.h"
|
||||
#include "domain_cgroup.h"
|
||||
#include "domain_interface.h"
|
||||
#include "domain_validate.h"
|
||||
#include "netdev_bandwidth_conf.h"
|
||||
#include "domain_nwfilter.h"
|
||||
#include "virlog.h"
|
||||
@ -3216,6 +3217,9 @@ qemuDomainAttachFSDevice(virQEMUDriver *driver,
|
||||
|
||||
qemuAssignDeviceFSAlias(vm->def, fs);
|
||||
|
||||
if (virDomainDeviceDefValidate(&dev, vm->def, 0, driver->xmlopt, priv->qemuCaps) < 0)
|
||||
goto cleanup;
|
||||
|
||||
chardev = virDomainChrSourceDefNew(priv->driver->xmlopt);
|
||||
chardev->type = VIR_DOMAIN_CHR_TYPE_UNIX;
|
||||
chardev->data.nix.path = qemuDomainGetVHostUserFSSocketPath(priv, fs);
|
||||
|
Loading…
Reference in New Issue
Block a user