[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are BSD partitions not supported?

From: Grégoire Sutre
Subject: Re: Are BSD partitions not supported?
Date: Tue, 01 Jun 2010 12:34:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100411 Icedove/3.0.4

On 05/31/2010 11:16 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:

Looks like we have to have different behaviour for different BSDs.
Since it looks like generic code would fail for ThisBSD or ThatBSD,
I propose to go by as-needed basis. So I think we should: -restrict
bsdlabel to being embed into msdos partitions of types a5, a6 or a9.
 -conditionalise the behaviour and use my patch for a5 (FreeBSD) and
 current behaviour for a6 (OpenBSD) and a9 (NetBSD).

We could be a bit more general and assume that BSD label offsets are
always relative except for NetBSD and OpenBSD msdos-embedded partitions.
In particular, we should support BSD labels that are not embedded in an
msdos partition.

So bsdlabel_partition_map_iterate would do (in pseudo code):

if   disk->partition is not NULL                /* embedded partition */
     disk->partition's partmap is msdos
     disk->partition's msdos partition type is NetBSD or OpenBSD
     interpret BSD label offsets as absolute    /* (a) */
     interpret BSD label offsets as relative    /* (b) */

In short, the normal interpretation of BSD label offsets would be the
relative one (b), and we would make an exception to handle NetBSD and
OpenBSD (a).

Now, when BSD label offsets are detected absolute (a), should we
consider them as absolute:
- w.r.t. to the start of the disk (as is done in the code right now),
- w.r.t to the location of the msdos partmap?
I prefer the second option since it is compatible with dd-ing an entire
disk into an msdos partition.  Maybe the loopback feature also requires
the second option (I don't know the internals).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]