[parted-devel] [PATCH 05/10] Ensure "blank" cmd-line before ped_exception_throw

Jim Meyering jim at meyering.net
Wed Jun 10 19:23:29 UTC 2009


Joel Granados Moreno wrote:
> When ped_exception_throw requires input from the user and there are
> leftover strings in the command line, there is an "invalid token" error
> from parted.  This happens because the ped_exception expects some input
> that is, most likely, different from the leftover string(s).  To address
> this, one must make sure that all the argument strings are parsed before
> invoking any exception that requires input.
>
> * parted/parted.c (do_mklabel): Put the command_line_get_disk_type call
> before the disk checks (_disk_warn_loss will call ped_exception_throw)
> * tests/t0000-basic.sh : The output needs not to include the error
> message.

Thanks!
Applied with these changes:
  - update copyright line to include 2009
  - adjust formatting, as below:

> +        if (!command_line_get_disk_type (_("New disk label type?"),
> +                    &type))

           if (!command_line_get_disk_type (_("New disk label type?"), &type))

...



More information about the parted-devel mailing list