From 698edf44ac9edbc0aca46f84e16676e9877a0980 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 20 May 2013 16:55:10 +0100 Subject: [PATCH] weston-launch: Print explanation of why we failed to open the device --- src/weston-launch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/weston-launch.c b/src/weston-launch.c index 64d4a8aee..d034c580d 100644 --- a/src/weston-launch.c +++ b/src/weston-launch.c @@ -318,12 +318,17 @@ handle_open(struct weston_launch *wl, struct msghdr *msg, ssize_t len) goto err0; fd = open(message->path, message->flags); - if (fd < 0) + if (fd < 0) { + fprintf(stderr, "Error opening device %s: %m\n", + message->path); goto err0; + } if (major(s.st_rdev) != INPUT_MAJOR) { close(fd); fd = -1; + fprintf(stderr, "Device %s is not an input device\n", + message->path); goto err0; }