fbarray: fix log message on truncation error
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 19 Feb 2021 17:54:45 +0000 (17:54 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 4 Mar 2021 10:37:05 +0000 (11:37 +0100)
commit2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82
tree5846656442d0eb025e9d0b4bc698f2002d36467f
parent44db5a5cf23f6157448fdb692efab605544762f3
fbarray: fix log message on truncation error

When file truncation fails, the log message attempts to print a path of
file we failed to truncate, but this path was never set to anything and,
what's worse, was uninitialized. Fix it by passing path from the caller.

Coverity issue: 366122
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Cc: stable@dpdk.org
Reported-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/librte_eal/common/eal_common_fbarray.c