GHashTable *nodes = opaque;
virJSONValuePtr img;
virJSONValuePtr bitmaps;
+ virJSONValuePtr format_specific;
const char *nodename;
g_autoptr(qemuBlockNamedNodeData) ent = NULL;
if ((bitmaps = virJSONValueObjectGetArray(val, "dirty-bitmaps")))
qemuMonitorJSONBlockGetNamedNodeDataBitmaps(bitmaps, ent);
+ /* query qcow2 format specific props */
+ if ((format_specific = virJSONValueObjectGetObject(img, "format-specific")) &&
+ STREQ_NULLABLE(virJSONValueObjectGetString(format_specific, "type"), "qcow2")) {
+ virJSONValuePtr qcow2props = virJSONValueObjectGetObject(format_specific, "data");
+
+ if (qcow2props &&
+ STREQ_NULLABLE(virJSONValueObjectGetString(qcow2props, "compat"), "0.10"))
+ ent->qcow2v2 = true;
+ }
+
if (virHashAddEntry(nodes, nodename, ent) < 0)
return -1;
return;
virBufferAsprintf(buf, "%s:\n", nodename);
+ if (data->qcow2v2)
+ virBufferAddLit(buf, " qcow2 v2\n");
virBufferAdjustIndent(buf, 1);
for (i = 0; i < data->nbitmaps; i++) {