I found some resources on the QCOW formats, and integrated the results
into magic/Magdir/msdos:

http://www.gnome.org/~markmc/qcow-image-format-version-1.html
http://www.gnome.org/~markmc/qcow-image-format.html

I ran into two issues, but they're not showstoppers. (1) The
backing-file name isn't stored in a NUL-terminated format; pretending
that it's NUL-terminated seems to work, but since I couldn't figure
out how to specify a string length based on an indirect value, it's
not being done the *right* way. (2) The offset to the backing-file
name in qcow2 images is a 64-bit quantity, but there's no way to put
in a 64-bit offset. I cheated and assumed that the top four bytes are
zero; this works on newly-created images, at least, though I can't
guarantee that it'll work in the general case.

I've attached a debdiff against 4.26-2 which overhauls QEMU image
detection in a number of ways--the magic number was incomplete, size
detection didn't work properly, and the output had a lot of whitespace
in it--if there's anything I need to do for the patch, please let me
know.

Adam Buchbinder



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to