提交 41c73f66 编写于 作者: J Ján Tomko

storage: move flag setting after declarations

上级 448c93cf
......@@ -652,10 +652,6 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
unsigned long long int size_arg;
bool preallocate = false;
virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, -1);
preallocate = !!(flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA);
const char *type = virStorageFileFormatTypeToString(vol->target.format);
const char *backingType = vol->backingStore.path ?
virStorageFileFormatTypeToString(vol->backingStore.format) : NULL;
......@@ -670,6 +666,10 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
inputvol->target.format) :
NULL;
virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, NULL);
preallocate = !!(flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA);
if (type == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown storage vol type %d"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册