mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
Explicitly reject unsupported storage types for legacy config generators
New storage types are not implemented in generators for -drive and the xen config. Explicitly reject them in case of a programming error. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
db4dd170a2
commit
f4fea84f59
@ -1525,7 +1525,9 @@ xenFormatXLDiskSrc(virStorageSource *src, char **srcstr)
|
|||||||
case VIR_STORAGE_TYPE_VHOST_USER:
|
case VIR_STORAGE_TYPE_VHOST_USER:
|
||||||
case VIR_STORAGE_TYPE_NONE:
|
case VIR_STORAGE_TYPE_NONE:
|
||||||
case VIR_STORAGE_TYPE_LAST:
|
case VIR_STORAGE_TYPE_LAST:
|
||||||
break;
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
|
_("unsupported storage type for this code path"));
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1638,10 +1638,11 @@ qemuBuildDriveSourceStr(virDomainDiskDef *disk,
|
|||||||
case VIR_STORAGE_TYPE_VHOST_USER:
|
case VIR_STORAGE_TYPE_VHOST_USER:
|
||||||
case VIR_STORAGE_TYPE_NONE:
|
case VIR_STORAGE_TYPE_NONE:
|
||||||
case VIR_STORAGE_TYPE_LAST:
|
case VIR_STORAGE_TYPE_LAST:
|
||||||
break;
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
|
_("unsupported storage type for this code path"));
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virBufferAddLit(buf, ",");
|
virBufferAddLit(buf, ",");
|
||||||
|
|
||||||
if (encinfo) {
|
if (encinfo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user