Commit 9f7cb6aa authored by Changpeng Liu's avatar Changpeng Liu Committed by Tomasz Zawadzki
Browse files

examples/nvme/cmb_copy: exit the test tool if no controller found



fix issue #2200.

Change-Id: I9d0374e56f199d562c48581ec6630547175d8627
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9927


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 6000920e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -397,6 +397,11 @@ int main(int argc, char **argv)
		g_config.cmb.ctrlr = g_config.write.ctrlr;
	}

	if (!g_config.read.ctrlr || !g_config.write.ctrlr) {
		fprintf(stderr, "No NVMe controller that support CMB was found!\n");
		return -1;
	}

	/*
	 * Call the cmb_copy() function which performs the CMB
	 * based copy or returns an error code if it fails.