From: Quentin Monnet <quentin@isovalent.com>
To: Manu Bretelle <chantr4@gmail.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH] tools: bpftool: json: fix backslash escape typo in jsonw_puts
Date: Wed, 29 Mar 2023 10:46:33 +0100 [thread overview]
Message-ID: <4b65f781-351d-2f47-17ae-e042d8ee2f08@isovalent.com> (raw)
In-Reply-To: <20230329073002.2026563-1-chantr4@gmail.com>
2023-03-29 00:30 UTC-0700 ~ Manu Bretelle <chantr4@gmail.com>
> This is essentially a backport of iproute2's
> commit ed54f76484b5 ("json: fix backslash escape typo in jsonw_puts")
>
> Also added the stdio.h include in json_writer.h to be able to compile
> and run the json_writer test as used below).
>
> Before this fix:
>
> $ gcc -D notused -D TEST -I../../include -o json_writer json_writer.c
> json_writer.h
> $ ./json_writer
> {
> "Vyatta": {
> "url": "http://vyatta.com",
> "downloads": 2000000,
> "stock": 8.16,
> "ARGV": [],
> "empty": [],
> "NIL": {},
> "my_null": null,
> "special chars": [
> "slash": "/",
> "newline": "\n",
> "tab": "\t",
> "ff": "\f",
> "quote": "\"",
> "tick": "'",
> "backslash": "\n"
> ]
> }
> }
>
> After:
>
> $ gcc -D notused -D TEST -I../../include -o json_writer json_writer.c
> json_writer.h
> $ ./json_writer
> {
> "Vyatta": {
> "url": "http://vyatta.com",
> "downloads": 2000000,
> "stock": 8.16,
> "ARGV": [],
> "empty": [],
> "NIL": {},
> "my_null": null,
> "special chars": [
> "slash": "/",
> "newline": "\n",
> "tab": "\t",
> "ff": "\f",
> "quote": "\"",
> "tick": "'",
> "backslash": "\\"
> ]
> }
> }
>
> Signed-off-by: Manu Bretelle <chantr4@gmail.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Thank you!
next prev parent reply other threads:[~2023-03-29 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 7:30 [PATCH] tools: bpftool: json: fix backslash escape typo in jsonw_puts Manu Bretelle
2023-03-29 9:46 ` Quentin Monnet [this message]
2023-03-29 17:00 ` patchwork-bot+netdevbpf
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=4b65f781-351d-2f47-17ae-e042d8ee2f08@isovalent.com \
--to=quentin@isovalent.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=chantr4@gmail.com \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox