Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLOQs-0002N4-7R for qemu-devel@nongnu.org; Tue, 12 Apr 2005 12:40:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLOQo-0002Kc-OR for qemu-devel@nongnu.org; Tue, 12 Apr 2005 12:40:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLOQn-0002JY-TP for qemu-devel@nongnu.org; Tue, 12 Apr 2005 12:40:05 -0400 Received: from [217.65.98.56] (helo=shiva.galaktik.hu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLOsD-0000iS-HS for qemu-devel@nongnu.org; Tue, 12 Apr 2005 13:08:26 -0400 Received: from [10.0.0.201] (helo=caprice.artificis.hu) by shiva.galaktik.hu with esmtp (Exim 3.35 #1 (Debian)) id 1DLQXP-0001pH-00 for ; Tue, 12 Apr 2005 20:55:03 +0200 Date: Tue, 12 Apr 2005 19:11:13 +0200 From: Alex Beregszaszi Message-Id: <20050412191113.01d0c138@caprice.artificis.hu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Tue__12_Apr_2005_19_11_13_+0200_.Ac3X9TXdkx=5v_m" Subject: [Qemu-devel] [PATCH] Correct .dmg support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --Multipart=_Tue__12_Apr_2005_19_11_13_+0200_.Ac3X9TXdkx=5v_m Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi, looks like the dmg driver doesnt sets the total_sectors variable, thus I cannot convert the images. Fixed. -- Alex Beregszaszi e-mail: alex@fsn.hu Free Software Network cell: +36 70 3144424 --Multipart=_Tue__12_Apr_2005_19_11_13_+0200_.Ac3X9TXdkx=5v_m Content-Type: text/x-diff; name="block-dmg.diff" Content-Disposition: attachment; filename="block-dmg.diff" Content-Transfer-Encoding: 7bit Index: block-dmg.c =================================================================== RCS file: /cvsroot/qemu/qemu/block-dmg.c,v retrieving revision 1.2 diff -u -r1.2 block-dmg.c --- block-dmg.c 3 Jan 2005 23:39:08 -0000 1.2 +++ block-dmg.c 12 Apr 2005 17:05:49 -0000 @@ -106,6 +106,8 @@ if(lseek(s->fd,0xf8,SEEK_CUR)<0) goto dmg_close; + bs->total_sectors = 0; + /* read offsets */ last_in_offset = last_out_offset = 0; while(lseek(s->fd,0,SEEK_CUR)lengths[i]; if(s->sectorcounts[i]>max_sectors_per_chunk) max_sectors_per_chunk = s->sectorcounts[i]; + bs->total_sectors += s->sectorcounts[i]; } s->n_chunks+=chunk_count; } --Multipart=_Tue__12_Apr_2005_19_11_13_+0200_.Ac3X9TXdkx=5v_m--