[pve-devel] [PATCH pve-zsync 1/2] rename encode_cron to parse_cron

Fabian Ebner f.ebner at proxmox.com
Mon Feb 21 10:07:49 CET 2022


The old name is confusing, because "encode" is usually not used when
converting from text to a data structure.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 pve-zsync | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pve-zsync b/pve-zsync
index b466076..7246336 100755
--- a/pve-zsync
+++ b/pve-zsync
@@ -232,7 +232,7 @@ sub read_cron {
 
     my $text = read_file($CRONJOBS, 0);
 
-    return encode_cron(@{$text});
+    return parse_cron(@{$text});
 }
 
 sub parse_argv {
@@ -302,7 +302,7 @@ sub add_state_to_job {
     return $job;
 }
 
-sub encode_cron {
+sub parse_cron {
     my (@text) = @_;
 
     my $cfg = {};
-- 
2.30.2






More information about the pve-devel mailing list