]> git.proxmox.com Git - pve-qemu.git/commitdiff
fix hmp info backup command
authorTim Marx <t.marx@proxmox.com>
Thu, 23 Jan 2020 10:32:15 +0000 (11:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 25 Jan 2020 15:09:47 +0000 (16:09 +0100)
Signed-off-by: Tim Marx <t.marx@proxmox.com>
debian/patches/pve/0047-PVE-fix-hmp-info-backup-cmd-for-not-initialized-back.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/pve/0047-PVE-fix-hmp-info-backup-cmd-for-not-initialized-back.patch b/debian/patches/pve/0047-PVE-fix-hmp-info-backup-cmd-for-not-initialized-back.patch
new file mode 100644 (file)
index 0000000..417609b
--- /dev/null
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tim Marx <t.marx@proxmox.com>
+Date: Wed, 22 Jan 2020 16:22:14 +0100
+Subject: [PATCH] PVE: fix hmp info backup cmd for not initialized
+ backup_state.backup_mutex
+
+Signed-off-by: Tim Marx <t.marx@proxmox.com>
+---
+ monitor/hmp-cmds.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
+index bc9ca346f7..fb820410de 100644
+--- a/monitor/hmp-cmds.c
++++ b/monitor/hmp-cmds.c
+@@ -201,6 +201,12 @@ void hmp_info_backup(Monitor *mon, const QDict *qdict)
+     BackupStatus *info;
+     info = qmp_query_backup(NULL);
++
++    if (!info) {
++      monitor_printf(mon, "Backup status: not initialized\n");
++      return;
++    }
++
+     if (info->has_status) {
+         if (info->has_errmsg) {
+             monitor_printf(mon, "Backup status: %s - %s\n",
+-- 
+2.20.1
+
index a09ba1b1f29c415daa51cf99dff16a94bd17e20a..c37c4e12a4e4f1565c6cc0dbba620b01ac548d70 100644 (file)
@@ -46,3 +46,4 @@ pve/0043-PVE-fixup-blockdev-pvebackup-integration-fix-blockjo.patch
 pve/0044-Acquire-aio_context-before-calling-block_job_add_bdr.patch
 pve/0045-PVE-Compat-4.0-used-balloon-qemu-4-0-config-size-fal.patch
 pve/0046-PVE-Allow-version-code-in-machine-type.patch
+pve/0047-PVE-fix-hmp-info-backup-cmd-for-not-initialized-back.patch