[parted-devel] [PATCH 2/2] parted: make align-check work in interactive mode

Jim Meyering jim at meyering.net
Thu May 27 13:52:59 UTC 2010


Petr Uzel wrote:

> On Thu, May 27, 2010 at 12:01:23PM +0200, Jim Meyering wrote:
>>
>> > What about the 'FIXME:' part in original patch? It seems to work fine
>> > as is, but perhaps I'm missing something...
>>
>> That return code appears to be unused in interactive mode.
>>
>>   # ./parted /dev/sdd
>>   GNU Parted 2.2.76-33c1
>>   Using /dev/sdd
>>   Welcome to GNU Parted! Type 'help' to view a list of commands.
>>   (parted) align-check opt 1
>>   1 not aligned
>>   (parted) q
>
> If I'm not mistaken, the return value is propagated to
> interactive_mode() (parted/ui.c:1565) and there, based on the
> return value, the command_line_flush() is either executed or skipped.

That is true.
However, does it make a difference?

> I don't understand this code much, but it looks to me that
> command_line_flush() should be executed everytime (why would
> we need to keep the command_line buffer?).

If you'd like to change things some other way,
you're welcome to send a patch.
However, I confess that I dislike interactive mode,
partly because it appears to be less robust overall,
and partly because it is slightly harder to test.



More information about the parted-devel mailing list