Re: 2.5.28 and partitions

From: Mike Touloumtzis (miket@bluemug.com)
Date: Fri Aug 02 2002 - 14:47:01 EST


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/



This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:20 EST