public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH guest-common] vzdump: print prune-backups options in command_line correctly
@ 2020-11-24 10:14 Fabian Ebner
  2020-11-24 10:32 ` Fabian Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2020-11-24 10:14 UTC (permalink / raw)
  To: pve-devel

Otherwise it prints the hash reference instead of the prune options.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---

AFAICT the result of the function was only used for printing, so this
should've been a cosmetic problem only.

 PVE/VZDump/Common.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm
index 63a4689..648c906 100644
--- a/PVE/VZDump/Common.pm
+++ b/PVE/VZDump/Common.pm
@@ -377,6 +377,10 @@ sub command_line {
 	    foreach my $path (split(/\0/, $v || '')) {
 		$cmd .= " --$p " . PVE::Tools::shellquote($path);
 	    }
+	} elsif ($p eq 'prune-backups') {
+	    my $property_string = PVE::JSONSchema::print_property_string($v, 'prune-backups');
+	    $cmd .= " --$p " . PVE::Tools::shellquote($property_string)
+		if defined($property_string) && $property_string ne '';
 	} else {
 	    $cmd .= " --$p " . PVE::Tools::shellquote($v) if defined($v) && $v ne '';
 	}
-- 
2.20.1





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

end of thread, other threads:[~2020-11-24 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 10:14 [pve-devel] [PATCH guest-common] vzdump: print prune-backups options in command_line correctly Fabian Ebner
2020-11-24 10:32 ` Fabian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal