[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disk addresses in MB

From: Andrew Clausen
Subject: Re: Disk addresses in MB
Date: Tue, 9 Jul 2002 09:47:52 +1000
User-agent: Mutt/1.3.28i

On Mon, Jul 08, 2002 at 10:16:20PM +0800, Mathias Koerber wrote:
> Ihave just started looking into parted and
> am very confused by parted's use of fractional MBs
> to specify and print disk addresses.
> Traditional fdisk shows clusters, sectors etc.

Yeah, I should get around to adding a "units" option to the interface.

So, there are two parts to this:
(1) accepting unit in any unit (with suffixes like k, m, g, %, etc.)
Also, allow specifying a default unit

(2) displaying output in a specified unit (probably the same as
the default input unit)

I think (2) is harder.  ATM, input all goes through command_line_get_sector().
Output is direct via printf(), so we prolly need some function for
displaying in the preferred units.  This is horrible.  For example,
exceptions might say "Partition needs to be at least 1024Mb".
I'm not excited about adding bloat to make it come out in the users'
preferred unit.

So, perhaps only "print" should be affected.
Also, what's a good interface for setting the default unit?

> Partition8 ends at 5185.041 and partition 9
> starts at 5185.072. What´s with the .031 MB
> in between? In some cases, (between 10 and 11)
> it´s 0.32MB..

There is some free space, and some partition table metadata in between.

> Wouldn´t it be much easierand more exact to
> specify sectors, clusters etc which simply
> cannot be fractional?

You mean sectors, cylinders, etc.?  Answer: they don't mean much
to (most) users (including me!).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]