[parted-devel] [PATCH] parted: Print the Fixing... message to stderr

Phillip Susi phill at thesusis.net
Fri Jul 26 17:14:01 BST 2024


"Brian C. Lane" <bcl at redhat.com> writes:

> Otherwise it messes up stdout of things like --json
>
> Thanks to Mikael Q for reporting this.
> ---
>  parted/ui.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/parted/ui.c b/parted/ui.c
> index 33a1808..d6d1da4 100644
> --- a/parted/ui.c
> +++ b/parted/ui.c
> @@ -645,7 +645,7 @@ exception_handler (PedException* ex)
>          /* script-mode and fix? */
>          int fix_is_an_option = (ex->options & PED_EXCEPTION_FIX);
>          if (opt_script_mode && opt_fix_mode && fix_is_an_option) {
> -                printf ("Fixing, due to --fix\n");
> +                fprintf (stderr, "Fixing, due to --fix\n");
>                  return PED_EXCEPTION_FIX;
>          }
>  
> -- 
> 2.45.2

Thumbs up.



More information about the parted-devel mailing list