From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IZDnZ-0004u3-6U for qemu-devel@nongnu.org; Sat, 22 Sep 2007 18:50:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IZDnX-0004tr-Bz for qemu-devel@nongnu.org; Sat, 22 Sep 2007 18:50:04 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZDnX-0004to-6t for qemu-devel@nongnu.org; Sat, 22 Sep 2007 18:50:03 -0400 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IZDnW-0005Ho-MO for qemu-devel@nongnu.org; Sat, 22 Sep 2007 18:50:03 -0400 Date: Sat, 22 Sep 2007 23:48:55 +0100 (BST) From: Johannes Schindelin Subject: Re: [Qemu-devel] [PATCH] vvfat mbr fixes In-Reply-To: <219e947f0709221443l494e4c46w6efafce989dbb867@mail.gmail.com> Message-ID: References: <219e947f0709221443l494e4c46w6efafce989dbb867@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ivan Kalvachev Cc: qemu-devel@nongnu.org Hi, On Sun, 23 Sep 2007, Ivan Kalvachev wrote: > I've been having problems using vvfat virtual block device. Even linux > fdisk was able to find problems with it. The reason turned out to be > simple, MBR have bogus parameters. Thanks for doing this; I did not find any time for that. Overall, I like what you did, but here are some comments (if you would have inlined the patch, I would have commented with references): - I like the convert_sector2CHS() function, although I would have named it sector2CHS() for brevity (although the pretty magic -- or unintuitive -- detection if lba is needed would have to be done differently, which I maintain would be better), - you write the NT-ID byte-per-byte, whereas I would have used strcpy() for clarity, - I'd have introduced a member nt_id instead of hardcoding an offset into the "ignored" part, and - fat_type == 12 and lba does not make sense, or does it? Thanks, Dscho