Re: 2.5.28 and partitions

Mike Touloumtzis (miket@bluemug.com)
Fri, 2 Aug 2002 12:47:01 -0700


On Thu, Aug 01, 2002 at 05:24:37PM -0400, Albert D. Cahalan wrote:
> Alexander Viro writes:
> > [...]
> >> On Wed, 31 Jul 2002, Alexander Viro wrote:
>
> >>> What the bleedin' hell is wrong with <name> <start> <len>\n
> >>> - all in ASCII? Terminated by \0. No need for flags, no need
> >>> for endianness crap, no need to worry about field becoming too
> >>> narrow...
>
> There's just that little overflow problem to worry about,

Ummm:

-- stuff ASCII digits into u64 (or u32, or whatever)
-- if (still more digits)
-- printk("partition too big to mount!\n")
-- return error

How hard is that?

> trailing garbage,

Don't write garbage into your partition table.

> encouragement of assumptions about the maximum size...
> is that a %d or a %llu or what?

See above. Use leading '-' for negative numbers. ASCII has no
2's complement ambiguity issues.

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