* [PATCH] hciemu: Print error in case hci_vhci is not loaded
@ 2013-12-11 9:36 Andrei Emeltchenko
0 siblings, 0 replies; only message in thread
From: Andrei Emeltchenko @ 2013-12-11 9:36 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Error message should indicate that module is not loaded:
Opening /dev/vhci failed: No such file or directory
---
src/shared/hciemu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/shared/hciemu.c b/src/shared/hciemu.c
index c2b4748..9f4bfaf 100644
--- a/src/shared/hciemu.c
+++ b/src/shared/hciemu.c
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
+#include <errno.h>
#include <sys/socket.h>
#include <glib.h>
@@ -216,6 +217,7 @@ static bool create_vhci(struct hciemu *hciemu)
fd = open("/dev/vhci", O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (fd < 0) {
+ perror("Opening /dev/vhci failed");
btdev_destroy(btdev);
return false;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-11 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 9:36 [PATCH] hciemu: Print error in case hci_vhci is not loaded Andrei Emeltchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).