From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXUIc-0005lc-D1 for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:16:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXUIb-0003oK-Df for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:16:02 -0400 MIME-Version: 1.0 In-Reply-To: <20160810094400.GE1109@stefanha-x1.localdomain> References: <20160808113421.27529-1-fullmanet@gmail.com> <20160810094400.GE1109@stefanha-x1.localdomain> From: Reda Sallahi Date: Wed, 10 Aug 2016 16:16:00 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v4] qemu-img: add skip option to dd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Kevin Wolf , Max Reitz , Fam Zheng On 8/10/16, Stefan Hajnoczi wrote: > 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 > I had to do a rebase with some minor changes anyway so that part will be changed as well in that version. -- Reda