virQEMUCapsPtr qemuCaps)
{
int actualType = virStorageSourceGetActualType(src);
+ bool blockdev = virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV);
if (src->format == VIR_STORAGE_FILE_COW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
/* In pre-blockdev era we can't configure the slice so we can allow them
* only for detected backing store entries as they are populated
* from a place that qemu would be able to read */
- if (!src->detected &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) {
+ if (!src->detected && !blockdev) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("storage slice is not supported by this QEMU binary"));
return -1;
return -1;
}
- if (!src->detected &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) {
+ if (!src->detected && !blockdev) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("ssl verification setting is not supported by this QEMU binary"));
return -1;
return -1;
}
- if (!src->detected &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) {
+ if (!src->detected && !blockdev) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("http cookies are not supported by this QEMU binary"));
return -1;
return -1;
}
- if (!src->detected &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) {
+ if (!src->detected && !blockdev) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("readahead setting is not supported with this QEMU binary"));
return -1;
return -1;
}
- if (!src->detected &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) {
+ if (!src->detected && !blockdev) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("timeout setting is not supported with this QEMU binary"));
return -1;