Received: from eggs.gnu.org ([2001:4830:134:3::10]:58644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXWO3-0006iU-Ji for qemu-devel@nongnu.org; Wed, 10 Aug 2016 12:29:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXWO2-0007YO-Aw for qemu-devel@nongnu.org; Wed, 10 Aug 2016 12:29:47 -0400 References: <20160810141609.32727-1-fullmanet@gmail.com> From: Max Reitz Message-ID: <4d64e0b8-8bbf-8516-af47-45099ef11a2d@redhat.com> Date: Wed, 10 Aug 2016 18:29:34 +0200 MIME-Version: 1.0 In-Reply-To: <20160810141609.32727-1-fullmanet@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3VfB7vXTbSBRnUX8airN9QLFJoTBCaMak" Subject: Re: [Qemu-devel] [PATCH v5] qemu-img: add skip option to dd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Reda Sallahi , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Fam Zheng , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3VfB7vXTbSBRnUX8airN9QLFJoTBCaMak From: Max Reitz To: Reda Sallahi , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Fam Zheng , Stefan Hajnoczi Message-ID: <4d64e0b8-8bbf-8516-af47-45099ef11a2d@redhat.com> Subject: Re: [PATCH v5] qemu-img: add skip option to dd References: <20160810141609.32727-1-fullmanet@gmail.com> In-Reply-To: <20160810141609.32727-1-fullmanet@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 10.08.2016 16:16, Reda Sallahi wrote: > This adds the skip option which allows qemu-img dd to skip a number of = blocks > before copying the input. >=20 > A test case was added to test the skip option. >=20 > Signed-off-by: Reda Sallahi > --- > Depends on: > [PATCH v9] qemu-img: add the 'dd' subcommand >=20 > Changes from v4: > * Rebase. > Changes from v3: > * Change write command to the test image in the test case. > Changes from v2: > * Delete a tab that sneaked in (test case 160). > Changes from v1: > * Change test case output. >=20 > qemu-img-cmds.hx | 4 +-- > qemu-img.c | 50 ++++++++++++++++++++++++++++---- > qemu-img.texi | 4 ++- > tests/qemu-iotests/160 | 72 ++++++++++++++++++++++++++++++++++++++= ++++++++ > tests/qemu-iotests/160.out | 51 ++++++++++++++++++++++++++++++++ > tests/qemu-iotests/group | 1 + > 6 files changed, 174 insertions(+), 8 deletions(-) > create mode 100755 tests/qemu-iotests/160 > create mode 100644 tests/qemu-iotests/160.out [...] > diff --git a/qemu-img.c b/qemu-img.c > index 034baf7..3adec86 100644 > --- a/qemu-img.c > +++ b/qemu-img.c [...] > @@ -4049,9 +4078,20 @@ static int img_dd(int argc, char **argv) [...] > - for (in_pos =3D 0, out_pos =3D 0; in_pos < size; block_count++) { > + for (out_pos =3D 0; in_pos < size; block_count++) { *whistle* /me hopes nobody will notice that block_count is absolutely unused apart from this place... Anyway, thanks, I've applied this patch to my block-next branch: https://github.com/XanClic/qemu/commits/block-next Max --3VfB7vXTbSBRnUX8airN9QLFJoTBCaMak Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEvBAEBCAAZBQJXq1ZuEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRA7sUIC6DisrRCd B/9bOxQisoJneBCUDrOxgtGVN8XPsUdsCMyPO91+LK+hl1kiZRX8T1lD7jhAJF+f pvN/atuwyu0kxNe9P70UVDlW46CTZs2LT48iJUO4b99rXEKL9VmmKh7/YRzkagPr zUTTJVnquW3yyr8/BoOcFYD/50qwWfoFzyh79WaO354ShF4IYVmpFhA1GXzutYpy 7hkDqn2Z8vGlM0GxXSqbzo0Ga2f4lzy0YZkNunJsxplSZvHb/DHuBdrRtPMvnm3i tkI+mWWL52GJ+HtSDbo98tOb0mD0DJZUMeoDws1xDR+Wedrve4+/WaVGfy9d74rC T8XGnZBiaI0jgcznz29FLroN =30Ya -----END PGP SIGNATURE----- --3VfB7vXTbSBRnUX8airN9QLFJoTBCaMak--