From be73ac8a5a3ddad1f035c517466a4fca131fd478 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 6 Dec 2013 10:08:17 +0100 Subject: [PATCH] fix error message --- debian/patches/backup-add-dir-format.patch | 34 ++++++++++--------- .../backup-add-pve-monitor-commands.patch | 29 +++++++++------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/debian/patches/backup-add-dir-format.patch b/debian/patches/backup-add-dir-format.patch index e1e527d..91b2f03 100644 --- a/debian/patches/backup-add-dir-format.patch +++ b/debian/patches/backup-add-dir-format.patch @@ -1,7 +1,7 @@ Index: new/qapi-schema.json =================================================================== ---- new.orig/qapi-schema.json 2013-12-06 08:42:27.000000000 +0100 -+++ new/qapi-schema.json 2013-12-06 08:57:27.000000000 +0100 +--- new.orig/qapi-schema.json 2013-12-06 09:11:43.000000000 +0100 ++++ new/qapi-schema.json 2013-12-06 09:27:30.000000000 +0100 @@ -586,7 +586,7 @@ # @vma: Proxmox vma backup format ## @@ -13,8 +13,8 @@ Index: new/qapi-schema.json # @backup: Index: new/blockdev.c =================================================================== ---- new.orig/blockdev.c 2013-12-06 08:53:36.000000000 +0100 -+++ new/blockdev.c 2013-12-06 08:59:07.000000000 +0100 +--- new.orig/blockdev.c 2013-12-06 09:26:53.000000000 +0100 ++++ new/blockdev.c 2013-12-06 09:28:58.000000000 +0100 @@ -1760,6 +1760,8 @@ uint8_t dev_id; //bool started; @@ -24,7 +24,7 @@ Index: new/blockdev.c } PVEBackupDevInfo; static void pvebackup_run_next_job(void); -@@ -1827,15 +1829,16 @@ +@@ -1827,8 +1829,6 @@ { PVEBackupDevInfo *di = opaque; @@ -32,6 +32,8 @@ Index: new/blockdev.c - di->completed = true; + if (ret < 0 && !backup_state.error) { +@@ -1839,8 +1839,11 @@ BlockDriverState *bs = di->bs; di->bs = NULL; @@ -44,7 +46,7 @@ Index: new/blockdev.c block_job_cb(bs, ret); -@@ -1912,6 +1915,7 @@ +@@ -1917,6 +1920,7 @@ bool has_speed, int64_t speed, Error **errp) { BlockDriverState *bs; @@ -52,7 +54,7 @@ Index: new/blockdev.c Error *local_err = NULL; uuid_t uuid; VmaWriter *vmaw = NULL; -@@ -1928,11 +1932,6 @@ +@@ -1933,11 +1937,6 @@ /* Todo: try to auto-detect format based on file name */ format = has_format ? format : BACKUP_FORMAT_VMA; @@ -64,7 +66,7 @@ Index: new/blockdev.c if (has_devlist) { devs = g_strsplit_set(devlist, ",;:", -1); -@@ -2000,27 +1999,63 @@ +@@ -2005,27 +2004,63 @@ uuid_generate(uuid); @@ -144,7 +146,7 @@ Index: new/blockdev.c } /* add configuration file to archive */ -@@ -2033,12 +2068,27 @@ +@@ -2038,12 +2073,27 @@ goto err; } @@ -177,7 +179,7 @@ Index: new/blockdev.c g_free(cdata); } -@@ -2078,10 +2128,11 @@ +@@ -2083,10 +2133,11 @@ PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data; l = g_list_next(l); @@ -190,7 +192,7 @@ Index: new/blockdev.c if (local_err != NULL) { error_setg(&backup_state.error, "backup_job_create failed"); pvebackup_cancel(NULL); -@@ -2098,8 +2149,17 @@ +@@ -2103,8 +2154,17 @@ l = di_list; while (l) { @@ -209,7 +211,7 @@ Index: new/blockdev.c } g_list_free(di_list); -@@ -2113,6 +2173,10 @@ +@@ -2118,6 +2178,10 @@ unlink(backup_file); } @@ -222,8 +224,8 @@ Index: new/blockdev.c Index: new/hmp-commands.hx =================================================================== ---- new.orig/hmp-commands.hx 2013-12-06 08:42:27.000000000 +0100 -+++ new/hmp-commands.hx 2013-12-06 08:57:27.000000000 +0100 +--- new.orig/hmp-commands.hx 2013-12-06 09:11:43.000000000 +0100 ++++ new/hmp-commands.hx 2013-12-06 09:27:30.000000000 +0100 @@ -85,9 +85,11 @@ { @@ -241,8 +243,8 @@ Index: new/hmp-commands.hx Index: new/hmp.c =================================================================== ---- new.orig/hmp.c 2013-12-06 08:42:27.000000000 +0100 -+++ new/hmp.c 2013-12-06 08:57:27.000000000 +0100 +--- new.orig/hmp.c 2013-12-06 09:11:43.000000000 +0100 ++++ new/hmp.c 2013-12-06 09:27:30.000000000 +0100 @@ -1245,11 +1245,13 @@ { Error *error = NULL; diff --git a/debian/patches/backup-add-pve-monitor-commands.patch b/debian/patches/backup-add-pve-monitor-commands.patch index 67e0467..86695eb 100644 --- a/debian/patches/backup-add-pve-monitor-commands.patch +++ b/debian/patches/backup-add-pve-monitor-commands.patch @@ -1,7 +1,7 @@ Index: new/blockdev.c =================================================================== ---- new.orig/blockdev.c 2013-12-06 07:46:29.000000000 +0100 -+++ new/blockdev.c 2013-12-06 08:53:36.000000000 +0100 +--- new.orig/blockdev.c 2013-12-06 10:04:18.000000000 +0100 ++++ new/blockdev.c 2013-12-06 10:07:21.000000000 +0100 @@ -45,6 +45,7 @@ #include "qmp-commands.h" #include "trace.h" @@ -18,7 +18,7 @@ Index: new/blockdev.c static void eject_device(BlockDriverState *bs, int force, Error **errp) { if (bdrv_in_use(bs)) { -@@ -1736,6 +1736,431 @@ +@@ -1736,6 +1736,436 @@ bdrv_put_ref_bh_schedule(bs); } @@ -117,6 +117,11 @@ Index: new/blockdev.c + + di->completed = true; + ++ if (ret < 0 && !backup_state.error) { ++ error_setg(&backup_state.error, "job failed with err %d - %s", ++ ret, strerror(-ret)); ++ } ++ + BlockDriverState *bs = di->bs; + + di->bs = NULL; @@ -453,7 +458,7 @@ Index: new/blockdev.c Index: new/hmp-commands.hx =================================================================== --- new.orig/hmp-commands.hx 2013-12-03 06:36:18.000000000 +0100 -+++ new/hmp-commands.hx 2013-12-06 08:42:27.000000000 +0100 ++++ new/hmp-commands.hx 2013-12-06 10:06:44.000000000 +0100 @@ -83,6 +83,35 @@ Copy data from a backing file into a block device. ETEXI @@ -501,8 +506,8 @@ Index: new/hmp-commands.hx @item info migrate_capabilities Index: new/hmp.c =================================================================== ---- new.orig/hmp.c 2013-12-06 07:46:29.000000000 +0100 -+++ new/hmp.c 2013-12-06 08:42:27.000000000 +0100 +--- new.orig/hmp.c 2013-12-06 10:04:18.000000000 +0100 ++++ new/hmp.c 2013-12-06 10:06:44.000000000 +0100 @@ -133,6 +133,44 @@ qapi_free_MouseInfoList(mice_list); } @@ -581,7 +586,7 @@ Index: new/hmp.c Index: new/hmp.h =================================================================== --- new.orig/hmp.h 2013-12-03 06:36:18.000000000 +0100 -+++ new/hmp.h 2013-12-06 07:46:38.000000000 +0100 ++++ new/hmp.h 2013-12-06 10:04:22.000000000 +0100 @@ -28,6 +28,7 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict); void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict); @@ -602,7 +607,7 @@ Index: new/hmp.h Index: new/monitor.c =================================================================== --- new.orig/monitor.c 2013-12-03 06:36:18.000000000 +0100 -+++ new/monitor.c 2013-12-06 07:46:38.000000000 +0100 ++++ new/monitor.c 2013-12-06 10:04:22.000000000 +0100 @@ -2880,6 +2880,13 @@ }, #endif @@ -619,8 +624,8 @@ Index: new/monitor.c .params = "", Index: new/qapi-schema.json =================================================================== ---- new.orig/qapi-schema.json 2013-12-06 07:46:29.000000000 +0100 -+++ new/qapi-schema.json 2013-12-06 08:42:27.000000000 +0100 +--- new.orig/qapi-schema.json 2013-12-06 10:04:18.000000000 +0100 ++++ new/qapi-schema.json 2013-12-06 10:06:44.000000000 +0100 @@ -547,6 +547,95 @@ ## { 'command': 'query-events', 'returns': ['EventInfo'] } @@ -719,8 +724,8 @@ Index: new/qapi-schema.json # Index: new/qmp-commands.hx =================================================================== ---- new.orig/qmp-commands.hx 2013-12-06 07:46:29.000000000 +0100 -+++ new/qmp-commands.hx 2013-12-06 07:46:38.000000000 +0100 +--- new.orig/qmp-commands.hx 2013-12-06 10:04:18.000000000 +0100 ++++ new/qmp-commands.hx 2013-12-06 10:04:22.000000000 +0100 @@ -966,6 +966,24 @@ EQMP -- 2.39.2