vhost: exit the vhost app for error configuration
Change-Id: I56cc1df278a35bf40f3bb67d25af6dc3658aac82 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/382770 Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
cbbac707c3
commit
d804492f02
@ -947,7 +947,7 @@ spdk_vhost_startup(void *arg1, void *arg2)
|
||||
ret = snprintf(dev_dirname, sizeof(dev_dirname) - 2, "%s", basename);
|
||||
if ((size_t)ret >= sizeof(dev_dirname) - 2) {
|
||||
SPDK_ERRLOG("Char dev dir path length %d is too long\n", ret);
|
||||
abort();
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (dev_dirname[ret - 1] != '/') {
|
||||
@ -959,14 +959,19 @@ spdk_vhost_startup(void *arg1, void *arg2)
|
||||
ret = spdk_vhost_scsi_controller_construct();
|
||||
if (ret != 0) {
|
||||
SPDK_ERRLOG("Cannot construct vhost controllers\n");
|
||||
abort();
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = spdk_vhost_blk_controller_construct();
|
||||
if (ret != 0) {
|
||||
SPDK_ERRLOG("Cannot construct vhost block controllers\n");
|
||||
abort();
|
||||
goto out;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
out:
|
||||
spdk_vhost_shutdown_cb();
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user