From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6cj0-0000l6-D0 for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6cit-0006L6-B1 for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:34:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6cit-0006Kv-3Q for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:34:31 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r768YUc9017016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Aug 2013 04:34:30 -0400 Date: Tue, 6 Aug 2013 10:34:25 +0200 From: Kevin Wolf Message-ID: <20130806083425.GC3117@dhcp-200-207.str.redhat.com> References: <595d71cf1cd25ac9deff521bceb82b8c3da888d0.1375325971.git.jcody@redhat.com> <20130805150536.GK2654@dhcp-200-207.str.redhat.com> <20130805150956.GC19080@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130805150956.GC19080@localhost.localdomain> Subject: Re: [Qemu-devel] [PATCH v2 2/9] block: vhdx - add header update capability. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Am 05.08.2013 um 17:09 hat Jeff Cody geschrieben: > On Mon, Aug 05, 2013 at 05:05:36PM +0200, Kevin Wolf wrote: > > Am 01.08.2013 um 05:23 hat Jeff Cody geschrieben: > > > This adds the ability to update the headers in a VHDX image, including > > > generating a new MS-compatible GUID. > > > > > > As VHDX depends on uuid.h, VHDX is now a configurable build option. If > > > VHDX support is enabled, that will also enable uuid as well. The > > > default is to have VHDX enabled. > > > > > > To enable/disable VHDX: --enable-vhdx, --disable-vhdx > > > > > > Signed-off-by: Jeff Cody > > > > I knew I'd forget to mention something I had seen... > > > > > + /* overwrite the actual VHDXHeader portion */ > > > + memcpy(buffer, inactive_header, sizeof(VHDXHeader)); > > > + inactive_header->checksum = vhdx_update_checksum(buffer, > > > + VHDX_HEADER_SIZE, 4); > > > > This I would prefer as offsetof(VHDXHeader, checksum) instead of a magic > > number 4. > > Who doesn't like a little bit of magic? :) I think I would have accepted a properly implemented qemu_rand(). :-) Kevin