[pve-devel] applied: [PATCH pve-qemu] fix hmp info backup command

Thomas Lamprecht t.lamprecht at proxmox.com
Sat Jan 25 16:20:29 CET 2020


On 1/23/20 11:32 AM, Tim Marx wrote:
> Signed-off-by: Tim Marx <t.marx at proxmox.com>
> ---
>  ...-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
> 

applied, thanks! Followed up with fixing the indentation to 4 spaces
per level (no crazy Perl style here ;) )

> 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 <t.marx at 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 at 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
> +
> 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
> 





More information about the pve-devel mailing list