From 3113b446f126635ec63029e6829eba51c4d4437e Mon Sep 17 00:00:00 2001 From: wuzhouhui Date: Tue, 14 Aug 2018 19:56:50 +0800 Subject: [PATCH] vhost: return more appropriate errno if controller is still in use Change-Id: I7716f1748803872cac85e296d60747752ca046f4 Signed-off-by: wuzhouhui Reviewed-on: https://review.gerrithub.io/422273 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu Chandler-Test-Pool: SPDK Automated Test System --- lib/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index ef6a227a0b..1120477dd8 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -770,7 +770,7 @@ spdk_vhost_dev_unregister(struct spdk_vhost_dev *vdev) { if (vdev->vid != -1) { SPDK_ERRLOG("Controller %s has still valid connection.\n", vdev->name); - return -ENODEV; + return -EBUSY; } if (vdev->registered && rte_vhost_driver_unregister(vdev->path) != 0) {