Re: rfc: test whether a device has a partition table

From: Linus Torvalds
Date: Wed Sep 24 2003 - 23:57:21 EST



On Wed, 24 Sep 2003, Linus Torvalds wrote:
>
> And your random byte checks for power-of-2 make no sense. What are they
> based on?

Oh, I found the regular DOS bootsector layout.

The thing is, that's FAT-specific. The BIOS doesn't care, and the old
Linux boot-sector stuff never had that, for example. It has the 0xAA55
flag, and that makes it bootable.

I bet the same is true of other bootsectors too, that either didn't know
about the FAT version, or just needed the space for better things and knew
the BIOS didn't care. And some of them might easily have powers-of-two
values in those magic bytes.

Linus

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