all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] vzdump: assemble: improve error messages
@ 2023-10-23  8:59 Fiona Ebner
  2023-10-23 15:09 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2023-10-23  8:59 UTC (permalink / raw)
  To: pve-devel

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>
---
 PVE/VZDump/QemuServer.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] vzdump: assemble: improve error messages
  2023-10-23  8:59 [pve-devel] [PATCH qemu-server] vzdump: assemble: improve error messages Fiona Ebner
@ 2023-10-23 15:09 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-10-23 15:09 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 23/10/2023 um 10:59 schrieb Fiona Ebner:
> 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>
> ---
>  PVE/VZDump/QemuServer.pm | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-23 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23  8:59 [pve-devel] [PATCH qemu-server] vzdump: assemble: improve error messages Fiona Ebner
2023-10-23 15:09 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal