1 Index: new/vma-writer.c
2 ===================================================================
3 --- new.orig/vma-writer.c 2014-11-20 07:34:19.000000000 +0100
4 +++ new/vma-writer.c 2014-11-20 07:49:17.000000000 +0100
9 +void vma_writer_error_propagate(VmaWriter *vmaw, Error **errp)
11 + if (vmaw->status < 0 && *errp == NULL) {
12 + error_setg(errp, "%s", vmaw->errmsg);
16 int vma_writer_close(VmaWriter *vmaw, Error **errp)
18 g_assert(vmaw != NULL);
20 ===================================================================
21 --- new.orig/vma.h 2014-11-20 07:34:27.000000000 +0100
22 +++ new/vma.h 2014-11-20 07:49:17.000000000 +0100
25 VmaWriter *vma_writer_create(const char *filename, uuid_t uuid, Error **errp);
26 int vma_writer_close(VmaWriter *vmaw, Error **errp);
27 +void vma_writer_error_propagate(VmaWriter *vmaw, Error **errp);
28 void vma_writer_destroy(VmaWriter *vmaw);
29 int vma_writer_add_config(VmaWriter *vmaw, const char *name, gpointer data,
32 ===================================================================
33 --- new.orig/blockdev.c 2014-11-20 07:49:14.000000000 +0100
34 +++ new/blockdev.c 2014-11-20 07:49:17.000000000 +0100
38 if (!backup_state.error) {
39 - error_setg(&backup_state.error, "vma_writer_write error %d", ret);
40 + vma_writer_error_propagate(backup_state.vmaw, &backup_state.error);
42 if (di->bs && di->bs->job) {
43 block_job_cancel(di->bs->job);