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>
case VIR_STORAGE_TYPE_VHOST_USER:
case VIR_STORAGE_TYPE_NONE:
case VIR_STORAGE_TYPE_LAST:
- break;
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("unsupported storage type for this code path"));
+ return -1;
}
return 0;
case VIR_STORAGE_TYPE_VHOST_USER:
case VIR_STORAGE_TYPE_NONE:
case VIR_STORAGE_TYPE_LAST:
- break;
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("unsupported storage type for this code path"));
+ return -1;
}
-
virBufferAddLit(buf, ",");
if (encinfo) {