From dad48ba3c401e6a60cd889d571d16dd8e2e1ff32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Lowas-Rzechonek?= Date: Tue, 20 Aug 2019 09:58:52 +0200 Subject: [PATCH] mesh: Show error message when io initialization fails Change-Id: I589800ccb7c4f5028ff3c57a6b6b8caab33a1180 Signed-off-by: Anupam Roy --- mesh/mesh-io-generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mesh/mesh-io-generic.c b/mesh/mesh-io-generic.c index cc91f49..42bf64a 100644 --- a/mesh/mesh-io-generic.c +++ b/mesh/mesh-io-generic.c @@ -21,6 +21,8 @@ #include #endif +#include +#include #include #include @@ -285,7 +287,8 @@ static bool hci_init(struct mesh_io *io) { io->pvt->hci = bt_hci_new_user_channel(io->pvt->index); if (!io->pvt->hci) { - l_error("Failed to start mesh io (hci %u)", io->pvt->index); + l_error("Failed to start mesh io (hci %u): %s", io->pvt->index, + strerror(errno)); return false; } -- 2.7.4