2 ===================================================================
5 @@ -299,7 +299,13 @@ static int extract_content(int argc, cha
8 BlockDriverState *bs = bdrv_new();
9 - if (errp || bdrv_open(&bs, devfn, NULL, NULL, flags, NULL, &errp)) {
11 + const char *tmp = g_strrstr(devfn, ".");
12 + const char *format = (tmp == NULL) ? "raw" : ++tmp;
14 + BlockDriver *drv = bdrv_find_format(format);
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));