vhost_iommu: handle opendir() failure
Change-Id: I82ce702ab1af83c2f5c0197a9766437f0f728dce Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/365067 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ff9c4b9a6e
commit
dcb7abc717
@ -91,6 +91,11 @@ vfio_cfg_init(void)
|
||||
}
|
||||
|
||||
dir = opendir("/proc/self/fd");
|
||||
if (!dir) {
|
||||
SPDK_ERRLOG("Failed to open /proc/self/fd (%d)\n", errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((d = readdir(dir)) != NULL) {
|
||||
if (d->d_type != DT_LNK)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user