All of lore.kernel.org
 help / color / mirror / Atom feed
From: Filipe Manana <fdmanana@gmail.com>
To: Sidong Yang <realwakka@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>, dsterba@suse.cz
Subject: Re: [RFC] btrfs-progs: format-output: remove newline in fmt_end text mode
Date: Wed, 17 Feb 2021 10:57:41 +0000	[thread overview]
Message-ID: <CAL3q7H6S2mGUjE-gU5opb4GT9ojxhn4EvbGjZfedytyBp6iQOg@mail.gmail.com> (raw)
In-Reply-To: <20210216162840.167845-1-realwakka@gmail.com>

On Tue, Feb 16, 2021 at 4:28 PM Sidong Yang <realwakka@gmail.com> wrote:
>
> Remove a code that inserting new line in fmt_end() for text mode.
> Old code made a failure in fstest btrfs/006.
>
> Signed-off-by: Sidong Yang <realwakka@gmail.com>
> ---
> Hi, I've just read mail that Filipe written that some failure about fstest.
> I'm worried about this patch makes other problem. So make it RFC. Thanks.

Fixes the test failure indeed, thanks!

> ---
>  common/format-output.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/common/format-output.c b/common/format-output.c
> index f5b12548..96e0dfef 100644
> --- a/common/format-output.c
> +++ b/common/format-output.c
> @@ -124,9 +124,7 @@ void fmt_end(struct format_ctx *fctx)
>
>         /* Close, no continuation to print */
>
> -       if (bconf.output_format & CMD_FORMAT_TEXT)
> -               putchar('\n');
> -       else if (bconf.output_format & CMD_FORMAT_JSON) {
> +       if (bconf.output_format & CMD_FORMAT_JSON) {
>                 fmt_dec_depth(fctx);
>                 fmt_separator(fctx);
>                 printf("}\n");
> --
> 2.25.1
>


-- 
Filipe David Manana,

“Whether you think you can, or you think you can't — you're right.”

  reply	other threads:[~2021-02-17 10:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 16:28 [RFC] btrfs-progs: format-output: remove newline in fmt_end text mode Sidong Yang
2021-02-17 10:57 ` Filipe Manana [this message]
2021-02-19 21:56 ` David Sterba
2021-02-20 16:42   ` Sidong Yang
2021-02-22 15:46     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL3q7H6S2mGUjE-gU5opb4GT9ojxhn4EvbGjZfedytyBp6iQOg@mail.gmail.com \
    --to=fdmanana@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=realwakka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.