Re: [dpdk-dev] [PATCH 1/2] vfio: fix check for vfio_group_fd

2020-09-17 Thread Burakov, Anatoly
On 19-May-20 4:42 AM, wangyunjian wrote: From: Yunjian Wang The issue is that a file descriptor at 0 is a valid one. Currently the file not found, the return value will be set to 0. As a result, it is impossible to distinguish between a correct descriptor and a failed return value. Fix it to re

[dpdk-dev] [PATCH 1/2] vfio: fix check for vfio_group_fd

2020-05-18 Thread wangyunjian
From: Yunjian Wang The issue is that a file descriptor at 0 is a valid one. Currently the file not found, the return value will be set to 0. As a result, it is impossible to distinguish between a correct descriptor and a failed return value. Fix it to return -ENOENT instead of 0. Fixes: b758423b