qemuDomainAttachRNGDevice: do not access source.file randomly

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.
This commit is contained in:
Ján Tomko 2017-10-12 14:55:53 +02:00
parent 7afaaa934b
commit fef2855366

View File

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