qemu: command: Use 'format' nodename accessors for 'pflash' backend setup

The frontend device needs to access the blocks directly so it cares
about the effective nodename.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-10-16 16:39:46 +02:00
parent abab5130f8
commit 1baf16fe04

View File

@ -7032,9 +7032,11 @@ qemuBuildMachineCommandLine(virCommand *cmd,
if (virDomainDefHasOldStyleUEFI(def)) {
if (priv->pflash0)
virBufferAsprintf(&buf, ",pflash0=%s", priv->pflash0->nodeformat);
virBufferAsprintf(&buf, ",pflash0=%s",
qemuBlockStorageSourceGetEffectiveNodename(priv->pflash0));
if (def->os.loader->nvram)
virBufferAsprintf(&buf, ",pflash1=%s", def->os.loader->nvram->nodeformat);
virBufferAsprintf(&buf, ",pflash1=%s",
qemuBlockStorageSourceGetEffectiveNodename(def->os.loader->nvram));
}
if (virDomainNumaHasHMAT(def->numa))