All of lore.kernel.org
 help / color / mirror / Atom feed
* more nits in cfdisk
@ 2015-02-08 20:20 Benno Schulenberg
  2015-02-10 12:20 ` Karel Zak
  2015-02-19 11:02 ` Karel Zak
  0 siblings, 2 replies; 3+ messages in thread
From: Benno Schulenberg @ 2015-02-08 20:20 UTC (permalink / raw)
  To: Util-Linux


Hi,

Starting cfdisk with --zero, a message on the bottom bar says:
"Device does not contain a recognized partition table."
This is most likely not an accurate message in this situation,
so an upcoming patch suggests to differentiate between an
invocation with --zero and a normal invocation.

A second patch will suggest to also accept a lowercase 'l'
for loading a script file.  The Load command isn't dangerous,
as is the Write command, so there is no need to make it
somewhat more difficult to enter.


When cfdisk prompts for a script file name, the line that says
"Select a type..." should probably be cleared.  And maybe also
the menu of label types?

When the user enters a wrong name or some other error occurs,
probably the line that says "The script file will be applied..."
should be cleared.


When starting cfdisk with --zero and choosing the sun label type,
a bottombar message says: "Note that partition table entries are
not in disk order now."  The menu item "Sort" is present, but
using it has no effect.  Probably things have to be this way and
the message shouldn't be given for a Sun label?


When on my disk I recreate the extended partition sda4, and
then make two partitions of 11G and 12G (sda5 and sda6), and
then delete the first, things look like this:

    /dev/sda4               93755392  312581807  218826416  104,4G   5 Extended
>>  ├─Free space            93757440  116828160   23070721     11G              
    ├─/dev/sda5            116828160  141993983   25165824     12G  83 Linux
    └─Free space           141996032  312581807  170585776   81,3G

When I then recreate the 11G partition, things suddenly look like this:

    /dev/sda4               93755392  312581807  218826416  104,4G   5 Extended
>>  ├─/dev/sda5            116828160  141993983   25165824     12G  83 Linux    
    ├─Free space           141996032  312581807  170585776   81,3G
    └─/dev/sda6             93757440  116828159   23070720     11G  83 Linux

The newly created partition is listed at the end, and the cursor
is no longer pointing at the same part of the disk (the one with
start sector 93757440).  I find this confusing.  Why does cfdisk
not auto-sort the partitions so that they are always in disk order?

When I then create a third partition (sda7) of 13G, things look thus:

    /dev/sda4               93755392  312581807  218826416  104,4G   5 Extended
    ├─/dev/sda5            116828160  141993983   25165824     12G  83 Linux
>>  ├─/dev/sda6             93757440  116828159   23070720     11G  83 Linux    
    ├─/dev/sda7            141996032  169259007   27262976     13G  83 Linux
    └─Free space           169261056  312581807  143320752   68,3G

Now suddenly sda6 is not listed at the end any more.  There is
some sense to this, but it is not user-friendly.  For one thing: the
cursor should always point at the space/partition that was just
created, never at a different one.  And if there is free space
that stretches till the end of the disk, then never any partition
should be listed after it (as occurs in the above middle example).

Benno

-- 
http://www.fastmail.com - IMAP accessible web-mail


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: more nits in cfdisk
  2015-02-08 20:20 more nits in cfdisk Benno Schulenberg
@ 2015-02-10 12:20 ` Karel Zak
  2015-02-19 11:02 ` Karel Zak
  1 sibling, 0 replies; 3+ messages in thread
From: Karel Zak @ 2015-02-10 12:20 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Util-Linux

On Sun, Feb 08, 2015 at 09:20:08PM +0100, Benno Schulenberg wrote:
> "Device does not contain a recognized partition table."
> This is most likely not an accurate message in this situation,
> so an upcoming patch suggests to differentiate between an
> invocation with --zero and a normal invocation.
> 
> A second patch will suggest to also accept a lowercase 'l'
> for loading a script file.  The Load command isn't dangerous,
> as is the Write command, so there is no need to make it
> somewhat more difficult to enter.

 Applied, thanks.

> When cfdisk prompts for a script file name, the line that says
> "Select a type..." should probably be cleared.  And maybe also
> the menu of label types?

 Improved.


> When the user enters a wrong name or some other error occurs,
> probably the line that says "The script file will be applied..."
> should be cleared.

 Improved.

> When starting cfdisk with --zero and choosing the sun label type,
> a bottombar message says: "Note that partition table entries are
> not in disk order now."  The menu item "Sort" is present, but
> using it has no effect.  Probably things have to be this way and
> the message shouldn't be given for a Sun label?

 Yes, fixed. (Note that Sun/SGI/BSD are not well tested with cfdisk.)


 I'm going to check/fix the rest from your list tomorrow. Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: more nits in cfdisk
  2015-02-08 20:20 more nits in cfdisk Benno Schulenberg
  2015-02-10 12:20 ` Karel Zak
@ 2015-02-19 11:02 ` Karel Zak
  1 sibling, 0 replies; 3+ messages in thread
From: Karel Zak @ 2015-02-19 11:02 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Util-Linux

On Sun, Feb 08, 2015 at 09:20:08PM +0100, Benno Schulenberg wrote:
> When on my disk I recreate the extended partition sda4, and
> then make two partitions of 11G and 12G (sda5 and sda6), and
> then delete the first, things look like this:
> 
>     /dev/sda4               93755392  312581807  218826416  104,4G   5 Extended
> >>  ├─Free space            93757440  116828160   23070721     11G              
>     ├─/dev/sda5            116828160  141993983   25165824     12G  83 Linux
>     └─Free space           141996032  312581807  170585776   81,3G
> 
> When I then recreate the 11G partition, things suddenly look like this:
> 
>     /dev/sda4               93755392  312581807  218826416  104,4G   5 Extended
> >>  ├─/dev/sda5            116828160  141993983   25165824     12G  83 Linux    
>     ├─Free space           141996032  312581807  170585776   81,3G
>     └─/dev/sda6             93757440  116828159   23070720     11G  83 Linux
> 
> The newly created partition is listed at the end, and the cursor
> is no longer pointing at the same part of the disk (the one with
> start sector 93757440).  I find this confusing. 

The issue with cursor is really disadvantage, I'll try to fix it
later.

> Why does cfdisk
> not auto-sort the partitions so that they are always in disk order?

Well, the "sort" operation is invasive, it changes mapping between
devname and the real area on the disk. I'd like to be careful with
this feature, but I think we can enable it for logical partitions if
we created all extended partition. Added to TODO.

> And if there is free space
> that stretches till the end of the disk, then never any partition
> should be listed after it (as occurs in the above middle example).

This is makes sense only if you create all the logical partitions from
scratch, otherwise gaps between partitions are reality which should
not be hidden.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-19 11:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-08 20:20 more nits in cfdisk Benno Schulenberg
2015-02-10 12:20 ` Karel Zak
2015-02-19 11:02 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.