qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Beregszaszi <alex@fsn.hu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Better .dmg autodetection
Date: Fri, 15 Apr 2005 18:47:58 +0200	[thread overview]
Message-ID: <20050415184758.0b831c1c@caprice.artificis.hu> (raw)
In-Reply-To: <1113339106.28622.196.camel@rapid>

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...

I spoke about better _autodetection_. Right now if it finds the .dmg
extension, the file will be threaten as DMG, and it will fail if I throw
an uncompressed one at it.

> > * 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.

Dont forget that the current implementations relies only on the file
extension...

Wrong, if it starts with ER (disk header) or PM, it is definitely an
uncompressed file, thus it should be used via the raw interface. But if
the first bytes resemble the zlib compression, it is definitely a dmg
file which should be handled inside block-dmg.

-- 
Alex Beregszaszi 			e-mail: alex@fsn.hu
Free Software Network			cell: +36 70 3144424

  reply	other threads:[~2005-04-15 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 17:28 [Qemu-devel] [PATCH] Better .dmg autodetection Alex Beregszaszi
2005-04-12 20:51 ` J. Mayer
2005-04-15 16:47   ` Alex Beregszaszi [this message]
2005-04-15 23:41     ` J. Mayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050415184758.0b831c1c@caprice.artificis.hu \
    --to=alex@fsn.hu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).