On 15/12/14 13:45, Kevin Wolf wrote:
Am 15.12.2014 um 09:27 hat Denis V. Lunev geschrieben:


An explicit error check should make gcc happy and would also improve the
error message for corrupt images without such an element (currently
"Parallels images with snapshots are not supported").

+    for (size = 0; image != NULL; image = image->next) {
+        if (image->type != XML_ELEMENT_NODE) {
+            continue;
+        }
+
+        size++;
+        data = xml_get_text(image, "Type", NULL);
+        if (data != NULL && strcmp(data, "Compressed")) {
+            error_setg(errp, "Only compressed Parallels images are supported");
+            goto done;
+        }
Does a spec for the format exist that I could check the code against?

This seems to imply that the default, if no "Type" element exists, is
compressed images. Correct?
Unfortunately, there is no formal spec in my hands.

The check itself is made to avoid "Plain" Parallels image.
I have consulted with the original author and from his
opinion the check was made "just to ensure". Images
without this element was never seen by him and by me.

As for the rest of your comments, "sure, will fix on next
submission".

Thank you for the prompt reply.

Regards,
    Den

Reply via email to