On Fri, Jun 17, 2022 at 4:35 AM Chengwen Feng <fengcheng...@huawei.com> wrote:
>
> The trace_session_name_generate() takes errno as the return value, but
> the errno was not set if strftime return zero, the previously set errno
> is returned in this case, this will result in inaccurate prompting.
>
> This patch sets errno to ENOSPC if strftime return zero to fix it.
>
> Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface")
> Cc: sta...@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengcheng...@huawei.com>

Good catch.

With the next fix, the error condition (on trace_dir being too short
to accomodate with formatted date) cannot be reached anymore.
I squashed those two patches together.
I also updated the commitlog to give some details why we were getting
a EEXIST (or ENOENT) errno.

-- 
David Marchand

Reply via email to