diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 5eb92bcef3..335ffc78bf 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -26900,9 +26900,8 @@ virDomainLoaderDefFormat(virBuffer *buf,
virTristateBoolTypeToString(loader->stateless));
}
- if (loader->format &&
- loader->format != VIR_STORAGE_FILE_RAW) {
- virBufferEscapeString(&loaderAttrBuf, " format='%s'",
+ if (loader->format > VIR_STORAGE_FILE_NONE) {
+ virBufferAsprintf(&loaderAttrBuf, " format='%s'",
virStorageFileFormatTypeToString(loader->format));
}
diff --git a/tests/qemuxmlconfdata/aarch64-virt-graphics.aarch64-latest.xml b/tests/qemuxmlconfdata/aarch64-virt-graphics.aarch64-latest.xml
index 31a5165fc3..6f3287d52d 100644
--- a/tests/qemuxmlconfdata/aarch64-virt-graphics.aarch64-latest.xml
+++ b/tests/qemuxmlconfdata/aarch64-virt-graphics.aarch64-latest.xml
@@ -15,7 +15,7 @@
- /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
+ /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
/path/to/guest_VARS.raw
diff --git a/tests/qemuxmlconfdata/aarch64-virt-headless-mmio.aarch64-latest.xml b/tests/qemuxmlconfdata/aarch64-virt-headless-mmio.aarch64-latest.xml
index dc2bce05dc..295c14c828 100644
--- a/tests/qemuxmlconfdata/aarch64-virt-headless-mmio.aarch64-latest.xml
+++ b/tests/qemuxmlconfdata/aarch64-virt-headless-mmio.aarch64-latest.xml
@@ -15,7 +15,7 @@
- /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
+ /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
/path/to/guest_VARS.raw
diff --git a/tests/qemuxmlconfdata/aarch64-virt-headless.aarch64-latest.xml b/tests/qemuxmlconfdata/aarch64-virt-headless.aarch64-latest.xml
index 24edcc5ab3..0b96654010 100644
--- a/tests/qemuxmlconfdata/aarch64-virt-headless.aarch64-latest.xml
+++ b/tests/qemuxmlconfdata/aarch64-virt-headless.aarch64-latest.xml
@@ -15,7 +15,7 @@
- /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
+ /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
/path/to/guest_VARS.raw
diff --git a/tests/qemuxmlconfdata/firmware-auto-bios-stateless.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-bios-stateless.x86_64-latest.xml
index e69f8c01d0..31b83b5593 100644
--- a/tests/qemuxmlconfdata/firmware-auto-bios-stateless.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-bios-stateless.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/seabios/bios-256k.bin
+ /usr/share/seabios/bios-256k.bin
diff --git a/tests/qemuxmlconfdata/firmware-auto-bios.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-bios.x86_64-latest.xml
index ffff5a79e2..d7471baa61 100644
--- a/tests/qemuxmlconfdata/firmware-auto-bios.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-bios.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/seabios/bios-256k.bin
+ /usr/share/seabios/bios-256k.bin
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-aarch64.aarch64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-aarch64.aarch64-latest.xml
index e07881f8cf..0ee421fe6f 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-aarch64.aarch64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-aarch64.aarch64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
+ /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml
index e454303158..79ab55751b 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.abi-update.xml b/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.abi-update.xml
index 44ef2c89f9..f95e2d2465 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.abi-update.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.abi-update.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
+ /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
/var/lib/libvirt/qemu/nvram/guest_VARS.raw
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.xml
index e07881f8cf..0ee421fe6f 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-loader-raw.aarch64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
+ /usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-loader-insecure.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-loader-insecure.x86_64-latest.xml
index f3c93e648a..28da16a5b4 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-loader-insecure.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-loader-insecure.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.xml
index f68cddf8df..1f09253a16 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.xml
@@ -6,7 +6,7 @@
1
hvm
- /path/to/OVMF_CODE.fd
+ /path/to/OVMF_CODE.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-loader-path.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-loader-path.x86_64-latest.xml
index 9ad97a9c37..e85b1be965 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-loader-path.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-loader-path.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-loader-secure.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-loader-secure.x86_64-latest.xml
index e454303158..79ab55751b 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-loader-secure.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-loader-secure.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.abi-update.xml b/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.abi-update.xml
index 6137d3448b..c69d053cec 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.abi-update.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.abi-update.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/loongarch64/QEMU_EFI.fd
+ /usr/share/edk2/loongarch64/QEMU_EFI.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.xml
index 6137d3448b..c69d053cec 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/loongarch64/QEMU_EFI.fd
+ /usr/share/edk2/loongarch64/QEMU_EFI.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml
index 875943f097..33134d405f 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-no-secboot.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-no-secboot.x86_64-latest.xml
index 9ad97a9c37..e85b1be965 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-no-secboot.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-no-secboot.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.fd
/var/lib/libvirt/qemu/nvram/guest_VARS.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-nvram-file.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-nvram-file.x86_64-latest.xml
index 317868a136..dac07adb3e 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-nvram-file.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-nvram-file.x86_64-latest.xml
@@ -10,7 +10,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.fd
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-nvram-network-iscsi.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-nvram-network-iscsi.x86_64-latest.xml
index da5816f3cd..b21932d1b8 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-nvram-network-iscsi.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-nvram-network-iscsi.x86_64-latest.xml
@@ -9,7 +9,7 @@
- /usr/share/edk2/ovmf/OVMF_CODE.fd
+ /usr/share/edk2/ovmf/OVMF_CODE.fd