BlockDriver *drv)
{
int ret;
+ int probed = 0;
if (flags & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
/* Find the right image format driver */
if (!drv) {
drv = find_image_format(filename);
+ probed = 1;
}
if (!drv) {
goto unlink_and_fail;
}
+ bs->probed = probed;
+
/* If there is a backing file, use it */
if ((flags & BDRV_O_NO_BACKING) == 0 && bs->backing_file[0] != '\0') {
char backing_filename[PATH_MAX];
}
memset(res, 0, sizeof(*res));
- res->corruptions = bs->drv->bdrv_check(bs);
- return res->corruptions < 0 ? res->corruptions : 0;
+ return bs->drv->bdrv_check(bs, res);
}
/* commit COW file into the raw image */