]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuDomainAttachRNGDevice: do not access source.file randomly
authorJán Tomko <jtomko@redhat.com>
Thu, 12 Oct 2017 12:55:53 +0000 (14:55 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 19 Oct 2017 12:34:21 +0000 (14:34 +0200)
We pass the source.file to qemuCheckCCWS390AddressSupport for
the purpose of reporting an error message without actually checking
that the rng device is of type VIR_DOMAIN_RNG_BACKEND_RANDOM.

Change it to a hardcoded "rng" string, which also avoids
referring to the device by a host-side attribute.

src/qemu/qemu_hotplug.c

index 2d13c28913ebb975427933598c57df3c762143a7..1e7931a84ac4ca95ade219c156c0aa4dcaf73e92 100644 (file)
@@ -2159,7 +2159,7 @@ qemuDomainAttachRNGDevice(virConnectPtr conn,
         }
     } else {
         if (!qemuCheckCCWS390AddressSupport(vm->def, rng->info, priv->qemuCaps,
-                                            rng->source.file))
+                                            "rng"))
             goto cleanup;
     }