summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2013-05-20 16:55:10 +0100
committerKristian Høgsberg <krh@bitplanet.net>2013-05-20 16:55:12 -0400
commitd33f2b065c57729f6eac98df71a4157da8f965d3 (patch)
tree8a2d88944080618f9168763841c8bdb30b7c7215
parent2f8d9aacfa940af2c9424224c90ac2b77b0a4f58 (diff)
weston-launch: Print explanation of why we failed to open the device
-rw-r--r--src/weston-launch.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/weston-launch.c b/src/weston-launch.c
index 89c3c5a2..42b2506c 100644
--- a/src/weston-launch.c
+++ b/src/weston-launch.c
@@ -320,12 +320,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;
}