exit(1);
}
-static int qprintf(bool quiet, const char *fmt, ...)
+static int GCC_FMT_ATTR(2, 3) qprintf(bool quiet, const char *fmt, ...)
{
int ret = 0;
if (!quiet) {
return 1;
}
- proto_drv = bdrv_find_protocol(filename);
+ proto_drv = bdrv_find_protocol(filename, true);
if (!proto_drv) {
error_report("Unknown protocol '%s'", filename);
return 1;
goto out;
}
- proto_drv = bdrv_find_protocol(out_filename);
+ proto_drv = bdrv_find_protocol(out_filename, true);
if (!proto_drv) {
error_report("Unknown protocol '%s'", out_filename);
ret = -1;
ImageInfoList *head = NULL;
ImageInfoList **last = &head;
GHashTable *filenames;
+ Error *err = NULL;
filenames = g_hash_table_new_full(g_str_hash, str_equal_func, NULL, NULL);
goto err;
}
- info = g_new0(ImageInfo, 1);
- bdrv_collect_image_info(bs, info, filename);
- bdrv_query_snapshot_info_list(bs, &info->snapshots, NULL);
- if (info->snapshots) {
- info->has_snapshots = true;
+ bdrv_query_image_info(bs, &info, &err);
+ if (error_is_set(&err)) {
+ error_report("%s", error_get_pretty(err));
+ error_free(err);
+ goto err;
}
elem = g_new0(ImageInfoList, 1);