]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/old/backup-vma-extract-add-block-driver-type.patch
bump version to 2.9.0-1~rc2+5
[pve-qemu-kvm.git] / debian / patches / old / backup-vma-extract-add-block-driver-type.patch
1 Index: new/vma.c
2 ===================================================================
3 --- new.orig/vma.c
4 +++ new/vma.c
5 @@ -299,7 +299,13 @@ static int extract_content(int argc, cha
6 }
7
8 BlockDriverState *bs = bdrv_new();
9 - if (errp || bdrv_open(&bs, devfn, NULL, NULL, flags, NULL, &errp)) {
10 +
11 + const char *tmp = g_strrstr(devfn, ".");
12 + const char *format = (tmp == NULL) ? "raw" : ++tmp;
13 +
14 + BlockDriver *drv = bdrv_find_format(format);
15 +
16 + if (errp || bdrv_open(&bs, devfn, NULL, NULL, flags, drv, &errp)) {
17 g_error("can't open file %s - %s", devfn,
18 error_get_pretty(errp));
19 }