[pve-devel] [PATCH v1 pve-common 15/18] pbsclient: don't return anything in PXAR methods
Max Carrara
m.carrara at proxmox.com
Fri Aug 2 15:26:53 CEST 2024
Due to the previously removed implicit return in `do_raw_client_cmd`,
the `run_raw_client_cmd` and consequently also the `backup_fs_tree`
and `restore_pxar` methods would return `0` on success if they didn't
`die` otherwise.
Therefore, because now nothing is actually returned, explicitly don't
return anything in order to prevent returning something implicitly in
the future (if e.g. `run_raw_client_cmd` is made to return something).
Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
src/PVE/PBSClient.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm
index 4ffdd04..4adb04c 100644
--- a/src/PVE/PBSClient.pm
+++ b/src/PVE/PBSClient.pm
@@ -605,7 +605,8 @@ sub backup_fs_tree {
$cmd_opts->{namespace} = $namespace;
}
- return run_raw_client_cmd($self, 'backup', $param, %$cmd_opts);
+ run_raw_client_cmd($self, 'backup', $param, %$cmd_opts);
+ return;
};
=pod
@@ -653,7 +654,8 @@ sub restore_pxar {
$cmd_opts->{namespace} = $namespace;
- return run_raw_client_cmd($self, 'restore', $param, %$cmd_opts);
+ run_raw_client_cmd($self, 'restore', $param, %$cmd_opts);
+ return;
};
=pod
--
2.39.2
More information about the pve-devel
mailing list