mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-01-26 05:06:45 +00:00
followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2a68ec7893
commit
87d92707b6
@ -854,14 +854,12 @@ __PACKAGE__->register_method({
|
||||
|
||||
my $conf = PVE::QemuConfig->load_config($param->{vmid});
|
||||
|
||||
my $snapname = $param->{snapshot};
|
||||
if ($snapname) {
|
||||
if (my $snapname = $param->{snapshot}) {
|
||||
my $snapshot = $conf->{snapshots}->{$snapname};
|
||||
die "snapshot '$snapname' does not exist\n"
|
||||
if !defined($snapshot);
|
||||
die "snapshot '$snapname' does not exist\n" if !defined($snapshot);
|
||||
|
||||
$snapshot->{digest} = $conf->{digest}; # keep file digest for API
|
||||
|
||||
# we need the digest of the file
|
||||
$snapshot->{digest} = $conf->{digest};
|
||||
$conf = $snapshot;
|
||||
}
|
||||
|
||||
|
||||
@ -5378,12 +5378,10 @@ sub vm_commandline {
|
||||
|
||||
if ($snapname) {
|
||||
my $snapshot = $conf->{snapshots}->{$snapname};
|
||||
die "snapshot '$snapname' does not exist\n"
|
||||
if !defined($snapshot);
|
||||
my $digest = $conf->{digest};
|
||||
die "snapshot '$snapname' does not exist\n" if !defined($snapshot);
|
||||
|
||||
$snapshot->{digest} = $conf->{digest}; # keep file digest for API
|
||||
|
||||
# we need the digest of the file
|
||||
$snapshot->{digest} = $conf->{digest};
|
||||
$conf = $snapshot;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user