On Wed, Nov 4, 2026 at 9:22 AM Gu Bin <[email protected]> wrote:
>
> make_path() builds the path whose direction is given by
> this_is_write_path, but the pr_err() labels it with the opposite
> direction: "read" when building the write path and "write" when
> building the read path, pointing the user at the wrong side when
> path generation fails. This is a cosmetic fix: only the error
> message text is wrong, the path construction logic is unaffected.
>
> Swap the literals so the message matches the attempted path.
>
> Fixes: 108fc82596e3 ("tools: Add guest trace agent as a user tool")

Acked-by: Eugenio Pérez <[email protected]>

Thanks!

> Signed-off-by: Gu Bin <[email protected]>
> ---
>  tools/virtio/virtio-trace/trace-agent.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/virtio/virtio-trace/trace-agent.c 
> b/tools/virtio/virtio-trace/trace-agent.c
> index 7e2d9bbf0b84..555521fc8bfd 100644
> --- a/tools/virtio/virtio-trace/trace-agent.c
> +++ b/tools/virtio/virtio-trace/trace-agent.c
> @@ -130,7 +130,7 @@ static const char *make_path(int cpu_num, bool 
> this_is_write_path)
>
>         if (ret <= 0) {
>                 pr_err("Failed to generate %s path(CPU#%d):%d\n",
> -                       this_is_write_path ? "read" : "write", cpu_num, ret);
> +                       this_is_write_path ? "write" : "read", cpu_num, ret);
>                 goto error;
>         }
>
> --
> 2.55.0.windows.3
>
>
>


Reply via email to