diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index f5b8822a5..2446e5713 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -297,7 +297,8 @@ spdk_vhost_dev_register(struct spdk_vhost_dev *vdev, SPDK_ERRLOG("Cannot remove %s: not a socket.\n", path); return -EINVAL; } else if (unlink(path) != 0) { - rte_exit(EXIT_FAILURE, "Cannot remove %s.\n", path); + SPDK_ERRLOG("Cannot remove %s.\n", path); + abort(); } } @@ -550,7 +551,8 @@ spdk_vhost_startup(void *arg1, void *arg2) if (basename && strlen(basename) > 0) { ret = snprintf(dev_dirname, sizeof(dev_dirname) - 2, "%s", basename); if ((size_t)ret >= sizeof(dev_dirname) - 2) { - rte_exit(EXIT_FAILURE, "Char dev dir path length %d is too long\n", ret); + SPDK_ERRLOG("Char dev dir path length %d is too long\n", ret); + abort(); } if (dev_dirname[ret - 1] != '/') { @@ -560,8 +562,10 @@ spdk_vhost_startup(void *arg1, void *arg2) } ret = spdk_vhost_scsi_controller_construct(); - if (ret != 0) - rte_exit(EXIT_FAILURE, "Cannot construct vhost controllers\n"); + if (ret != 0) { + SPDK_ERRLOG("Cannot construct vhost controllers\n"); + abort(); + } } static void * @@ -590,8 +594,10 @@ void spdk_vhost_shutdown_cb(void) { pthread_t tid; - if (pthread_create(&tid, NULL, &session_shutdown, NULL) < 0) - rte_panic("Failed to start session shutdown thread (%d): %s", errno, strerror(errno)); + if (pthread_create(&tid, NULL, &session_shutdown, NULL) < 0) { + SPDK_ERRLOG("Failed to start session shutdown thread (%d): %s", errno, strerror(errno)); + abort(); + } pthread_detach(tid); }