From 414e6df7ff8a5e53a1b3f4b54b0fb3fe273402b3 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Thu, 16 Nov 2017 14:35:51 +0100 Subject: [PATCH] vhost: clarify some error messages Change-Id: I761a599b993aab3b6df3189efaae15d9a2b0c8a0 Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/387748 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu --- lib/vhost/vhost.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index c34758e22..ca9fb4767 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -538,10 +538,14 @@ spdk_vhost_dev_construct(struct spdk_vhost_dev *vdev, const char *name, const ch /* Register vhost driver to handle vhost messages. */ if (stat(path, &file_stat) != -1) { if (!S_ISSOCK(file_stat.st_mode)) { - SPDK_ERRLOG("Cannot remove %s: not a socket.\n", path); + SPDK_ERRLOG("Cannot create a domain socket at path \"%s\": " + "The file already exists and is not a socket.\n", + path); return -EIO; } else if (unlink(path) != 0) { - SPDK_ERRLOG("Cannot remove %s.\n", path); + SPDK_ERRLOG("Cannot create a domain socket at path \"%s\": " + "The socket already exists and failed to unlink.\n", + path); return -EIO; } }