mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
qemuSnapshotPrepareDiskExternal: Move temp variables into the block using them
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c3e578b2ef
commit
006821a809
@ -541,9 +541,6 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
|
||||
bool reuse,
|
||||
bool blockdev)
|
||||
{
|
||||
struct stat st;
|
||||
int err;
|
||||
int rc;
|
||||
|
||||
if (disk->src->readonly && !(reuse || blockdev)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
@ -567,6 +564,10 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
|
||||
}
|
||||
|
||||
if (virStorageSourceIsLocalStorage(snapdisk->src)) {
|
||||
struct stat st;
|
||||
int err;
|
||||
int rc;
|
||||
|
||||
if (virStorageSourceInit(snapdisk->src) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user