Re: [PATCH] bsd disklabel detection

From: Andries.Brouwer@cwi.nl
Date: Thu Mar 23 2000 - 14:36:44 EST


>> just enable CONFIG_OSF_PARTITION

> You're right, except for one thing: msdos_partition is called before
> osf_partition. Since the disklabel does have the 0x55aa signature,
> msdos_partition will be happy with whatever junk it finds in the partition
> table, and thus osf_partition will never get a chance to run.

> Would it be reasonable to switch the two,

Yes, with a comment why. It is a bit annoying to have ordering
restrictions. Fortunately the 4-byte magic makes it unlikely
that a valid msdostable is mistaken for a bsd disklabel.
But it is not impossible - a former BSD disklabel, changed
by fdisk, might well have both DOS and BSD signatures.

Just like recognizing the rootfs is done by heuristics and
might need a boot option, also recognizing the partition table type
is done by heuristics and might need a boot option.

Andries

[And in case you make a new patch: I do not think
        printk((type == OPENBSD_PARTITION) ? " <openbsd:" :
+ printk((type == BSDI_PARTITION) ? " <bsdi:" :
will compile.]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:39 EST