* some comments about the new cfdisk
@ 2014-07-14 15:07 Benno Schulenberg
2014-07-14 19:23 ` some more " Benno Schulenberg
2014-07-15 10:59 ` some " Karel Zak
0 siblings, 2 replies; 7+ messages in thread
From: Benno Schulenberg @ 2014-07-14 15:07 UTC (permalink / raw)
To: Util-Linux
Hi,
Running cfdisk without an argument no longer works - it just
blurts out the usage text, instead of picking the first and only
hard drive in the system.
When exiting from cfdisk without having changed anything and
without having written the table to disk, it still writes to
standard output "Syncing disks." (with a missing newline).
To a novice that will be an alarming message. I think that
when the user did not ask to write anything to disk, cfdisk
should not be syncing disks, there is no need to, or at least
it should not show that message.
When in the "Select partition type" submenu, it is not possible
to exit from there with Esc. Hitting ^C instead kills the entire
cfdisk, which is kind of surprising and undesirable: any already
made changes would be lost.
I have two megabytes of free space at the tail of the disk. If
with the old cfdisk I delete the last partition, it will create
a single expanse of free space. But with the new cfdisk it will
then have two free spaces:
>> `-Free space 282779648 312576704 29797057 14.2G
Free space 312578048 312581807 3760 1.9M
It appears to be impossible to reuse that tailing free space.
Benno
--
http://www.fastmail.fm - Accessible with your email software
or over the web
^ permalink raw reply [flat|nested] 7+ messages in thread
* some more comments about the new cfdisk
2014-07-14 15:07 some comments about the new cfdisk Benno Schulenberg
@ 2014-07-14 19:23 ` Benno Schulenberg
2014-07-15 11:18 ` Karel Zak
2014-07-15 10:59 ` some " Karel Zak
1 sibling, 1 reply; 7+ messages in thread
From: Benno Schulenberg @ 2014-07-14 19:23 UTC (permalink / raw)
To: Util-Linux
My normal terminal emulator has 30 lines, and when in cfdisk typing H,
the help screen ends like this:
Note: All of the commands can be entered with either upper or lower
*Press a key to continue.*
One understands what is meant, of course, but it looks a bit unfinished.
And one wonders whether there is still more missing. And there might!
After reducing the number of lines to twenty (stty rows 20), the help
screen ends like this:
*Press a key to continue.*
Since this might destroy data on the disk, you must
:D
Pressing a key does not show the rest of the help text, but it
used to.
The help text also shows this entry:
s Fix partitions order
But this item is not shown in the main menu. Does it only
appear when the partitions are out of order? Then the help
text might want to say so, e.g. "(only when in disarray)".
Pressing s or S in the main menu does not give any feedback.
(But one can deduce that it is somehow a valid command, because
the help line at the bottom does not disappear when pressing it.)
It would be nicer if it said "Everything is in order" or something
similar.
When creating a new partition, it accepts as a suffix for sizes both
k and K, m and M, g and G. But for sectors it only accepts S, not s.
What is the reason that it accepts the j and k keys for moving
the cursor down and up?
Benno
--
http://www.fastmail.fm - The professional email service
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some comments about the new cfdisk
2014-07-14 15:07 some comments about the new cfdisk Benno Schulenberg
2014-07-14 19:23 ` some more " Benno Schulenberg
@ 2014-07-15 10:59 ` Karel Zak
2014-07-16 11:22 ` Benno Schulenberg
1 sibling, 1 reply; 7+ messages in thread
From: Karel Zak @ 2014-07-15 10:59 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
On Mon, Jul 14, 2014 at 05:07:50PM +0200, Benno Schulenberg wrote:
> Running cfdisk without an argument no longer works - it just
> blurts out the usage text, instead of picking the first and only
> hard drive in the system.
Yes, this is expected change. I think it's better to force
users to type the disk path than hardcode "sda" to the code,
but I have no strong opinion about it... no problem to change it.
(The correct way is to scan /proc/partitions and use the first
whole-disk. The original solution with hardcoded /dev/sda and
/dev/hda is ugly.)
> When exiting from cfdisk without having changed anything and
> without having written the table to disk, it still writes to
> standard output "Syncing disks." (with a missing newline).
> To a novice that will be an alarming message. I think that
> when the user did not ask to write anything to disk, cfdisk
> should not be syncing disks, there is no need to, or at least
> it should not show that message.
This is bug, fixed in git tree now.
> When in the "Select partition type" submenu, it is not possible
> to exit from there with Esc. Hitting ^C instead kills the entire
> cfdisk, which is kind of surprising and undesirable: any already
> made changes would be lost.
This is bug, fixed in git tree now. (All the menus is also sensitive
to 'g' and 'Q'.)
> I have two megabytes of free space at the tail of the disk. If
> with the old cfdisk I delete the last partition, it will create
> a single expanse of free space. But with the new cfdisk it will
> then have two free spaces:
>
> >> `-Free space 282779648 312576704 29797057 14.2G
> Free space 312578048 312581807 3760 1.9M
I guess the last partition is a logical partition. It's because
the extended partition (container for logical partitions) has
explicitly specified size and the new cfdisk does not change the
size.
The way how the new cfdisk works with free space is different, it
follows the gaps between partition etc. So it does not magically
merge all free space to the one pool. This solution is more generic
and usable for all disk labels.
It would be possible to add some extra optimization for MBR to
enlarge/reduce the extended partition if there is a free space behind
the partition and no possibility to create another primary partition.
Not sure... I'll think about it.
> It appears to be impossible to reuse that tailing free space.
.. because you already have allocated all primary partitions I guess.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some more comments about the new cfdisk
2014-07-14 19:23 ` some more " Benno Schulenberg
@ 2014-07-15 11:18 ` Karel Zak
0 siblings, 0 replies; 7+ messages in thread
From: Karel Zak @ 2014-07-15 11:18 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
On Mon, Jul 14, 2014 at 09:23:47PM +0200, Benno Schulenberg wrote:
>
> My normal terminal emulator has 30 lines, and when in cfdisk typing H,
> the help screen ends like this:
>
> Note: All of the commands can be entered with either upper or lower
> *Press a key to continue.*
>
> One understands what is meant, of course, but it looks a bit unfinished.
> And one wonders whether there is still more missing. And there might!
> After reducing the number of lines to twenty (stty rows 20), the help
> screen ends like this:
>
> *Press a key to continue.*
> Since this might destroy data on the disk, you must
>
> :D
>
> Pressing a key does not show the rest of the help text, but it
> used to.
Hmm... it seems it will be necessary to add support for UP/DOWN keys
for the help screen. OK, but in v2.26 :-)
> The help text also shows this entry:
>
> s Fix partitions order
>
> But this item is not shown in the main menu. Does it only
> appear when the partitions are out of order?
Well, all the actions and the main menu depend on context, it does
not offer useless actions at all.
> text might want to say so, e.g. "(only when in disarray)".
OK, added.
> Pressing s or S in the main menu does not give any feedback.
Sure, action is no active, menu is no sensitive to the key at all.
> When creating a new partition, it accepts as a suffix for sizes both
> k and K, m and M, g and G. But for sectors it only accepts S, not s.
Good point, fixed.
> What is the reason that it accepts the j and k keys for moving
> the cursor down and up?
...backward compatibility (probably for Vi maniacs).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some comments about the new cfdisk
2014-07-15 10:59 ` some " Karel Zak
@ 2014-07-16 11:22 ` Benno Schulenberg
2014-07-16 17:40 ` Felix Miata
2014-07-18 10:59 ` Karel Zak
0 siblings, 2 replies; 7+ messages in thread
From: Benno Schulenberg @ 2014-07-16 11:22 UTC (permalink / raw)
To: Karel Zak; +Cc: Util-Linux
On Tue, Jul 15, 2014, at 12:59, Karel Zak wrote:
> On Mon, Jul 14, 2014 at 05:07:50PM +0200, Benno Schulenberg wrote:
> > Running cfdisk without an argument no longer works - it just
> > blurts out the usage text, instead of picking the first and only
> > hard drive in the system.
>
> Yes, this is expected change. I think it's better to force
> users to type the disk path than hardcode "sda" to the code,
> but I have no strong opinion about it... no problem to change it.
It would be nice to have the old behaviour back. Either that,
or show an error message saying "expecting a device argument"
instead of blasting out the entire usage text.
> > I have two megabytes of free space at the tail of the disk. If
> > with the old cfdisk I delete the last partition, it will create
> > a single expanse of free space. But with the new cfdisk it will
> > then have two free spaces:
> >
> > >> `-Free space 282779648 312576704 29797057 14.2G
> > Free space 312578048 312581807 3760 1.9M
>
> I guess the last partition is a logical partition. It's because
> the extended partition (container for logical partitions) has
> explicitly specified size and the new cfdisk does not change the
> size.
Yes, I figured that out too, after a while.
> It would be possible to add some extra optimization for MBR to
> enlarge/reduce the extended partition if there is a free space behind
> the partition and no possibility to create another primary partition.
> Not sure... I'll think about it.
Don't bother for now. Somehow the current way feels more
precise.
Benno
--
http://www.fastmail.fm - The way an email service should be
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some comments about the new cfdisk
2014-07-16 11:22 ` Benno Schulenberg
@ 2014-07-16 17:40 ` Felix Miata
2014-07-18 10:59 ` Karel Zak
1 sibling, 0 replies; 7+ messages in thread
From: Felix Miata @ 2014-07-16 17:40 UTC (permalink / raw)
To: util-linux
On 2014-07-16 13:22 (GMT+0200) Benno Schulenberg composed:
> Karel Zak wrote:
>> It would be possible to add some extra optimization for MBR to
>> enlarge/reduce the extended partition if there is a free space behind
>> the partition and no possibility to create another primary partition.
>> Not sure... I'll think about it.
> Don't bother for now. Somehow the current way feels more
> precise.
Maybe I'm missing something in this discussion, but...
I find it inexplicably confusing that any partitioning tool would ever
describe an extended to exclude any freespace contiguous to any logical
partition, regardless how actually defined in the tables. Making creation of
a logical in freespace adjoining any existing logical take more than one step
makes no sense.
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)
Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!
Felix Miata *** http://fm.no-ip.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some comments about the new cfdisk
2014-07-16 11:22 ` Benno Schulenberg
2014-07-16 17:40 ` Felix Miata
@ 2014-07-18 10:59 ` Karel Zak
1 sibling, 0 replies; 7+ messages in thread
From: Karel Zak @ 2014-07-18 10:59 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
On Wed, Jul 16, 2014 at 01:22:53PM +0200, Benno Schulenberg wrote:
>
> On Tue, Jul 15, 2014, at 12:59, Karel Zak wrote:
> > On Mon, Jul 14, 2014 at 05:07:50PM +0200, Benno Schulenberg wrote:
> > > Running cfdisk without an argument no longer works - it just
> > > blurts out the usage text, instead of picking the first and only
> > > hard drive in the system.
> >
> > Yes, this is expected change. I think it's better to force
> > users to type the disk path than hardcode "sda" to the code,
> > but I have no strong opinion about it... no problem to change it.
>
> It would be nice to have the old behaviour back. Either that,
> or show an error message saying "expecting a device argument"
> instead of blasting out the entire usage text.
OK, fixed. For v2.25 we're going use the original solution from old
cfdisk (default to /dev/sda). For v2.26 I'd like to implement dialog
where you can select the disk (if you have more disks).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-18 10:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14 15:07 some comments about the new cfdisk Benno Schulenberg
2014-07-14 19:23 ` some more " Benno Schulenberg
2014-07-15 11:18 ` Karel Zak
2014-07-15 10:59 ` some " Karel Zak
2014-07-16 11:22 ` Benno Schulenberg
2014-07-16 17:40 ` Felix Miata
2014-07-18 10:59 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).