1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Stefan Reiter <s.reiter@proxmox.com>
3 Date: Mon, 6 Jul 2020 14:40:12 +0200
4 Subject: [PATCH] PVE: fixup pbs-restore API
6 Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
8 pbs-restore.c | 10 ++++++++--
9 1 file changed, 8 insertions(+), 2 deletions(-)
11 diff --git a/pbs-restore.c b/pbs-restore.c
12 index d4daee7e91..4d3f925a1b 100644
15 @@ -161,13 +161,19 @@ int main(int argc, char **argv)
16 fprintf(stderr, "connecting to repository '%s'\n", repository);
18 char *pbs_error = NULL;
19 - ProxmoxRestoreHandle *conn = proxmox_restore_connect(
20 + ProxmoxRestoreHandle *conn = proxmox_restore_new(
21 repository, snapshot, password, keyfile, key_password, fingerprint, &pbs_error);
23 fprintf(stderr, "restore failed: %s\n", pbs_error);
27 + int res = proxmox_restore_connect(conn, &pbs_error);
28 + if (res < 0 || pbs_error) {
29 + fprintf(stderr, "restore failed (connection error): %s\n", pbs_error);
33 QDict *options = qdict_new();
36 @@ -198,7 +204,7 @@ int main(int argc, char **argv)
37 fprintf(stderr, "starting to restore snapshot '%s'\n", snapshot);
38 fflush(stderr); // ensure we do not get printed after the progress log
40 - int res = proxmox_restore_image(
41 + res = proxmox_restore_image(