examples/vhost_blk: fix check of device path
authorJin Yu <jin.yu@intel.com>
Wed, 12 Feb 2020 12:54:46 +0000 (20:54 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 14 Feb 2020 11:42:13 +0000 (12:42 +0100)
commit71dd2870bf79930ac388b50d70fc319dd200e604
treea777f855e2c5d1f0702e58b11430d3a8ac248902
parentfacb02874d192580cd730a2be37b6afced523fd3
examples/vhost_blk: fix check of device path

Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn't exist the unlink fails and
it's ok to ignore. The second one is that unlink fails to remove
file but the next bind() would fail too.

Coverity issue: 350589, 158663
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
examples/vhost_blk/vhost_blk.c