]> git.proxmox.com Git - pve-qemu-kvm.git/blobdiff - debian/patches/pve/0032-vma-better-driver-guessing-for-bdrv_open.patch
refer to the new repository
[pve-qemu-kvm.git] / debian / patches / pve / 0032-vma-better-driver-guessing-for-bdrv_open.patch
diff --git a/debian/patches/pve/0032-vma-better-driver-guessing-for-bdrv_open.patch b/debian/patches/pve/0032-vma-better-driver-guessing-for-bdrv_open.patch
deleted file mode 100644 (file)
index 2a2614b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0cf02f586f50e0bc1b25f0ecf76207b2510d77df Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller@proxmox.com>
-Date: Tue, 23 Feb 2016 15:48:41 +0100
-Subject: [PATCH 32/48] vma: better driver guessing for bdrv_open
-
-Only use 'raw' when the file actually ends with .raw and
-no protocol has been specified. With protocol pass the
-BDRV_O_PROTOCOL flag to tell bdrv_fill_options() to take it
-into account.
----
- vma.c | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/vma.c b/vma.c
-index c7c0538..4903568 100644
---- a/vma.c
-+++ b/vma.c
-@@ -294,7 +294,20 @@ static int extract_content(int argc, char **argv)
-             }
-             BlockDriverState *bs = bdrv_new();
--            if (errp || bdrv_open(&bs, devfn, NULL, NULL, flags, &errp)) {
-+
-+          size_t devlen = strlen(devfn);
-+          bool protocol = path_has_protocol(devfn);
-+          QDict *options = NULL;
-+          if (devlen > 4 && strcmp(devfn+devlen-4, ".raw") == 0 && !protocol) {
-+              /* explicit raw format */
-+              options = qdict_new();
-+              qdict_put(options, "driver", qstring_from_str("raw"));
-+          } else if (protocol) {
-+              /* tell bdrv_open to honor the protocol */
-+              flags |= BDRV_O_PROTOCOL;
-+          }
-+
-+          if (errp || bdrv_open(&bs, devfn, NULL, options, flags, &errp)) {
-                 g_error("can't open file %s - %s", devfn,
-                         error_get_pretty(errp));
-             }
--- 
-2.1.4
-