qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Reda Sallahi <fullmanet@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4] qemu-img: add skip option to dd
Date: Wed, 10 Aug 2016 10:44:00 +0100	[thread overview]
Message-ID: <20160810094400.GE1109@stefanha-x1.localdomain> (raw)
In-Reply-To: <20160808113421.27529-1-fullmanet@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Mon, Aug 08, 2016 at 01:34:21PM +0200, Reda Sallahi wrote:
> @@ -4111,6 +4139,10 @@ static int img_dd(int argc, char **argv)
>  
>      in.buf = g_new(uint8_t, in.bsz);
>  
> +    if (dd.flags & C_SKIP) {
> +        incount = in.offset * in.bsz;
> +    }

Not worth changing unless there are other comments, but does this need
to be conditional?  If in.offset = 0 because C_SKIP was not specified
then incount = 0, which is correct.  Unconditional code is simpler.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-08-10 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 11:34 [Qemu-devel] [PATCH v4] qemu-img: add skip option to dd Reda Sallahi
2016-08-10  9:44 ` Stefan Hajnoczi [this message]
2016-08-10 14:16   ` Reda Sallahi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160810094400.GE1109@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=famz@redhat.com \
    --cc=fullmanet@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).