mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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 reuse,
|
||||||
bool blockdev)
|
bool blockdev)
|
||||||
{
|
{
|
||||||
struct stat st;
|
|
||||||
int err;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
if (disk->src->readonly && !(reuse || blockdev)) {
|
if (disk->src->readonly && !(reuse || blockdev)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
@ -567,6 +564,10 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (virStorageSourceIsLocalStorage(snapdisk->src)) {
|
if (virStorageSourceIsLocalStorage(snapdisk->src)) {
|
||||||
|
struct stat st;
|
||||||
|
int err;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (virStorageSourceInit(snapdisk->src) < 0)
|
if (virStorageSourceInit(snapdisk->src) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user