From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBQcG-0002wF-Ic for qemu-devel@nongnu.org; Wed, 14 Jan 2015 11:16:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBQcC-0001Sa-Aw for qemu-devel@nongnu.org; Wed, 14 Jan 2015 11:16:20 -0500 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:50805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBQcC-0001SW-1a for qemu-devel@nongnu.org; Wed, 14 Jan 2015 11:16:16 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so9834415wgg.5 for ; Wed, 14 Jan 2015 08:16:14 -0800 (PST) Date: Wed, 14 Jan 2015 16:16:12 +0000 From: Stefan Hajnoczi Message-ID: <20150114161612.GA1634@stefanha-thinkpad.redhat.com> References: <1420566495-13284-1-git-send-email-peter@lekensteyn.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <1420566495-13284-1-git-send-email-peter@lekensteyn.nl> Subject: Re: [Qemu-devel] [PATCH v2 00/12] block/dmg: (compatibility) fixes and bzip2 support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Wu Cc: Kevin Wolf , John Snow , qemu-devel@nongnu.org, Stefan Hajnoczi --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 06, 2015 at 06:48:03PM +0100, Peter Wu wrote: > Hi, >=20 > This is the second revision of improvements to DMG image file support. > See [1] for an overview of the previous patchset. >=20 > Thanks to John Snow for his efforts in reviewing patches and providing > suggestions. The errp suggestion from Stefan Hajnoczi is also > incorporated. >=20 > An overview of changes since v1 (also mentioned in each patch): >=20 > block/dmg: properly detect the UDIF trailer [+R-b, set errp) > block/dmg: extract mish block decoding functionality [+R-b, added > comments, expanded commit message, renamed var] > block/dmg: extract processing of resource forks [see patch] > block/dmg: process a buffer instead of reading ints [+R-b, no changes] > block/dmg: validate chunk size to avoid overflow [added offset check] > block/dmg: process XML plists [added offset check] > block/dmg: set virtual size to a non-zero value [fix commit message] > block/dmg: fix sector data offset calculation [use data provided by fil= e] > block/dmg: use SectorNumber from BLKX header [new patch] > block/dmg: factor out block type check [extracted from bzip patch] > block/dmg: support bzip2 block entry types [set/use BZIP2_LIBS] > block/dmg: improve zeroes handling [no changes] >=20 > (the other length checking patch was squashed into the others) >=20 > Note: in the previous patches I mentioned that dmg2img would result in a > shorter file than qemu-img convert. That turns out to be a bug in > dmg2img for which a patch is available[2]. >=20 > A quick test runner is available at > https://lekensteyn.nl/files/dmg-tests/. This script depends on the fixed > dmg2img program and can then be run as follows: >=20 > QEMU_IMG=3D/tmp/qout/qemu-img ./run-dmg-tests.sh dmg-images/*.dmg >=20 > You will first need some DMG files, I have collected four different > public examples with different properties[1]. These can be found in > urls.txt at https://lekensteyn.nl/files/dmg-tests/dmg-images/. >=20 > Kind regards, > Peter >=20 > [1]: https://lists.nongnu.org/archive/html/qemu-devel/2014-12/msg03606.h= tml > [2]: https://github.com/Lekensteyn/dmg2img/commit/a1d4861b4b0f2ac5090938= 233a1156bb130cb3ef >=20 > Peter Wu (12): > block/dmg: properly detect the UDIF trailer > block/dmg: extract mish block decoding functionality > block/dmg: extract processing of resource forks > block/dmg: process a buffer instead of reading ints > block/dmg: validate chunk size to avoid overflow > block/dmg: process XML plists > block/dmg: set virtual size to a non-zero value > block/dmg: fix sector data offset calculation > block/dmg: use SectorNumber from BLKX header > block/dmg: factor out block type check > block/dmg: support bzip2 block entry types > block/dmg: improve zeroes handling >=20 > block/Makefile.objs | 1 + > block/dmg.c | 503 ++++++++++++++++++++++++++++++++++++++++------= ------ > configure | 31 ++++ > 3 files changed, 418 insertions(+), 117 deletions(-) Hard to verify this does not introduce regressions since qemu-iotests does not support dmg. The code looks good though. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUtpZMAAoJEJykq7OBq3PIRJAH/R2mjxk2guXw65nvka0YDXil WQ2xmUuZmg9v2FUKjlQVIFZdyMj6aMfAQHlQXpwUPFOGXiwmWDYPVHhMuoYVPeWh c3IeDJWgSnzft2rq9G98EzK1i9vrvJ7p3Je7NWGBeLNDD6fO/ThrOcbpLnmLeLKL 198iGc9Bdg4EwLq2FrDDRUy8d0u/O2wLejrPP39QpmjA7w1Bm2S1grrzzWnIQVqg bzmo858hmkzQ22haPdy60n9weRwZ8h6fjhncunpAgPbi9fdTK3ODmdGAQu34yNWU A4mttyWMyBUVm2NQspgdyTScbcqNjmPvFD64NmDvN7zrWeTjHW5lxr+dIoDUI7k= =yhi8 -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--