mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: move flag setting after declarations
This commit is contained in:
parent
448c93cf98
commit
41c73f66bc
@ -652,10 +652,6 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
|
|||||||
unsigned long long int size_arg;
|
unsigned long long int size_arg;
|
||||||
bool preallocate = false;
|
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 *type = virStorageFileFormatTypeToString(vol->target.format);
|
||||||
const char *backingType = vol->backingStore.path ?
|
const char *backingType = vol->backingStore.path ?
|
||||||
virStorageFileFormatTypeToString(vol->backingStore.format) : NULL;
|
virStorageFileFormatTypeToString(vol->backingStore.format) : NULL;
|
||||||
@ -670,6 +666,10 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
|
|||||||
inputvol->target.format) :
|
inputvol->target.format) :
|
||||||
NULL;
|
NULL;
|
||||||
|
|
||||||
|
virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, NULL);
|
||||||
|
|
||||||
|
preallocate = !!(flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA);
|
||||||
|
|
||||||
if (type == NULL) {
|
if (type == NULL) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unknown storage vol type %d"),
|
_("unknown storage vol type %d"),
|
||||||
|
Loading…
Reference in New Issue
Block a user