From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLRv5-0005lW-V7 for qemu-devel@nongnu.org; Tue, 12 Apr 2005 16:23:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLRv4-0005lK-BZ for qemu-devel@nongnu.org; Tue, 12 Apr 2005 16:23:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLRv4-0005gw-6b for qemu-devel@nongnu.org; Tue, 12 Apr 2005 16:23:34 -0400 Received: from [62.210.158.45] (helo=quito.magic.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLSNB-00077R-SU for qemu-devel@nongnu.org; Tue, 12 Apr 2005 16:52:38 -0400 Received: from private2 (ppp-181.net-555.magic.fr [62.210.255.181]) by quito.magic.fr (8.11.6/8.11.2) with ESMTP id j3CKpht26094 for ; Tue, 12 Apr 2005 22:51:43 +0200 (CEST) Subject: Re: [Qemu-devel] [PATCH] Better .dmg autodetection From: "J. Mayer" In-Reply-To: <20050412192841.03d16475@caprice.artificis.hu> References: <20050412192841.03d16475@caprice.artificis.hu> Content-Type: text/plain Date: Tue, 12 Apr 2005 22:51:46 +0200 Message-Id: <1113339106.28622.196.camel@rapid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 On Tue, 2005-04-12 at 19:28 +0200, Alex Beregszaszi wrote: > Hi, > > There are quiet lot fake dmg files floating around. These are just raw > images containing the Apple partition map and HFS partitions. Those are not fake dmg. With Apple disk utility, you are free to choose if the dmg is to be compressed or not. Then, uncompressed dmg are valid ones. But, you don't need to manage them in block-dmg,c as those are just raw images... [...] > * last check if the filename ends in .dmg It seems to me that this check is not to be done. There's no need to. If the first sector (after decompression, if needed) is a valid Apple partition map _or_ a valid partition entry (ie with PM magic at start), then it's a valid dmg. File extensions never mean anything, they are just a user-interface oriented remainder, imho. -- J. Mayer Never organized