]> git.proxmox.com Git - mirror_qemu.git/commit
block/dmg: process XML plists
authorPeter Wu <peter@lekensteyn.nl>
Tue, 6 Jan 2015 17:48:09 +0000 (18:48 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 6 Feb 2015 16:24:21 +0000 (17:24 +0100)
commit0599e56ed468d245148530eb194be4a5056a0583
treedf55f645f978d415c4369c3e001a8d75c6711336
parentf6e6652d7c9251236fc1ecc6cece36104c7af15b
block/dmg: process XML plists

The format is simple enough to avoid using a full-blown XML parser. It
assumes that all BLKX items begin with the "mish" magic word, therefore
it is not a problem if other values get matched which are not a BLKX
block.

The offsets are based on the description at
http://newosxbook.com/DMG.html

For compatibility with glib 2.12, use g_base64_decode (which
additionally requires an extra buffer allocation) instead of
g_base64_decode_inplace (which is only available since glib 2.20).

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1420566495-13284-7-git-send-email-peter@lekensteyn.nl
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/dmg.c