From f47a9db42a3d25228b63cceec214ed1b92f39e50 Mon Sep 17 00:00:00 2001 From: Tim Marx Date: Thu, 23 Jan 2020 11:32:15 +0100 Subject: [PATCH] fix hmp info backup command Signed-off-by: Tim Marx --- ...-backup-cmd-for-not-initialized-back.patch | 31 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 debian/patches/pve/0047-PVE-fix-hmp-info-backup-cmd-for-not-initialized-back.patch 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 index 0000000..417609b --- /dev/null +++ b/debian/patches/pve/0047-PVE-fix-hmp-info-backup-cmd-for-not-initialized-back.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tim Marx +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 +--- + 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 + diff --git a/debian/patches/series b/debian/patches/series index a09ba1b..c37c4e1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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