提交 bb4f3543 编写于 作者: P Peter Krempa

qemu: command: Format rerror/werror with -device instead of -drive

Use the new proper location for the read/write error policy selection.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 a087a8e6
...@@ -1667,7 +1667,8 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, ...@@ -1667,7 +1667,8 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
/* werror/rerror are really frontend attributes, but older /* werror/rerror are really frontend attributes, but older
* qemu requires them on -drive instead of -device */ * qemu requires them on -drive instead of -device */
qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt); if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR))
qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
/* While this is a frontend attribute, it only makes sense to be used when /* While this is a frontend attribute, it only makes sense to be used when
...@@ -2129,6 +2130,9 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, ...@@ -2129,6 +2130,9 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
qemuBuildDiskFrontendAttributes(disk, &opt); qemuBuildDiskFrontendAttributes(disk, &opt);
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR))
qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
if (virBufferCheckError(&opt) < 0) if (virBufferCheckError(&opt) < 0)
goto error; goto error;
......
...@@ -25,17 +25,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ ...@@ -25,17 +25,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \ -boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
werror=stop,rerror=stop,cache=none \ cache=none \
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
write-cache=on \ write-cache=on,werror=stop,rerror=stop \
-drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\ -drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\
werror=enospc,cache=none \ cache=none \
-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\ -device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
write-cache=on \ write-cache=on,werror=enospc \
-drive file=/dev/HostVG/QEMUGuest3,format=qcow2,if=none,id=drive-ide0-1-0,\ -drive file=/dev/HostVG/QEMUGuest3,format=qcow2,if=none,id=drive-ide0-1-0,\
werror=report,rerror=ignore,cache=none \ cache=none \
-device ide-hd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\ -device ide-hd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\
write-cache=on \ write-cache=on,werror=report,rerror=ignore \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \ resourcecontrol=deny \
-msg timestamp=on -msg timestamp=on
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册