5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-03-12 20:58:26 +03:00

vzdump: assemble: improve error messages

by including the errno. Might make it clearer what the issue is in
cases like: https://forum.proxmox.com/threads/135261/

Also add the missing newlines, the missing "to" in the second message,
switch to the more common "or die" and avoid line bloat while at it.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-10-23 10:59:08 +02:00 committed by Thomas Lamprecht
parent 6f0627d4bd
commit b7bbeff3f9

View File

@ -222,10 +222,8 @@ sub assemble {
my $firewall_src = "/etc/pve/firewall/$vmid.fw"; my $firewall_src = "/etc/pve/firewall/$vmid.fw";
my $firewall_dest = "$task->{tmpdir}/qemu-server.fw"; my $firewall_dest = "$task->{tmpdir}/qemu-server.fw";
my $outfd = IO::File->new (">$outfile") || my $outfd = IO::File->new(">$outfile") or die "unable to open '$outfile' - $!\n";
die "unable to open '$outfile'"; my $conffd = IO::File->new($conffile, 'r') or die "unable to open '$conffile' - $!\n";
my $conffd = IO::File->new ($conffile, 'r') ||
die "unable open '$conffile'";
my $found_snapshot; my $found_snapshot;
my $found_pending; my $found_pending;