+++ /dev/null
-From a88a0bf330a1ede68e867d7ae932b3ffd4d4911a Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Wed, 9 Dec 2015 16:32:39 +0100
-Subject: [PATCH 25/55] backup: vma: add BlockDriver to bdrv_open in
- extract_content
-
----
- vma.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/vma.c b/vma.c
-index 00f20b0..543e7d8 100644
---- a/vma.c
-+++ b/vma.c
-@@ -299,7 +299,13 @@ static int extract_content(int argc, char **argv)
- }
-
- BlockDriverState *bs = bdrv_new();
-- if (errp || bdrv_open(&bs, devfn, NULL, NULL, flags, NULL, &errp)) {
-+
-+ const char *tmp = g_strrstr(devfn, ".");
-+ const char *format = (tmp == NULL) ? "raw" : ++tmp;
-+
-+ BlockDriver *drv = bdrv_find_format(format);
-+
-+ if (errp || bdrv_open(&bs, devfn, NULL, NULL, flags, drv, &errp)) {
- g_error("can't open file %s - %s", devfn,
- error_get_pretty(errp));
- }
---
-2.1.4
-