Commit dcb7abc7 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

vhost_iommu: handle opendir() failure



Change-Id: I82ce702ab1af83c2f5c0197a9766437f0f728dce
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365067


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ff9c4b9a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;