Re: [PATCH] partitions/msdos.c

From: Andries Brouwer
Date: Sat Feb 26 2005 - 17:53:17 EST


On Sat, Feb 26, 2005 at 02:28:45PM -0800, Linus Torvalds wrote:

> Would it not make more sense to just sanity-check the size itself, and
> throw it out if the partition size (plus start) is bigger than the disk
> size?

I don't mind.

> There might well be people use use partition type 0, just because they
> just never _set_ the partition type.. I don't think Linux has ever cared
> about any type except for the "extended partition" type, so checking for
> zero doesn't seem very safe..

The default fdisk will assign type 83 to a newly created partition.
One has to change it by hand to 0. So, I do not think testing against 0
is so bad. A heuristic, You give another heuristic. Probably there will
be a point in time where we need both.

(About type 0: DOS has used type 0 as definition of unused. It is not
bad if Linux uses DOS-conventions for a DOS-type partition table.)

Andries
-
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/