[pve-devel] [PATCH v6 02/22] parse_vm_config: correctly handle $descr
Dietmar Maurer
dietmar at proxmox.com
Tue Nov 25 12:24:09 CET 2014
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
PVE/QemuServer.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 96eb6ec..e020740 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1782,7 +1782,7 @@ sub parse_vm_config {
my $res = {
digest => Digest::SHA::sha1_hex($raw),
snapshots => {},
- pending => {}
+ pending => {},
};
$filename =~ m|/qemu-server/(\d+)\.conf$|
@@ -1798,10 +1798,12 @@ sub parse_vm_config {
next if $line =~ m/^\s*$/;
if ($line =~ m/^\[PENDING\]\s*$/i) {
+ $conf->{description} = $descr if $descr;
+ $descr = '';
$conf = $res->{pending} = {};
next;
- }elsif ($line =~ m/^\[([a-z][a-z0-9_\-]+)\]\s*$/i) {
+ } elsif ($line =~ m/^\[([a-z][a-z0-9_\-]+)\]\s*$/i) {
my $snapname = $1;
$conf->{description} = $descr if $descr;
$descr = '';
--
1.7.10.4
More information about the pve-devel
mailing list