commit 02c2fa3
Michael Forney
·
2014-01-22 11:48:06 +0000 UTC
parent bafc060
launch: die if EVIOCREVOKE fails
1 files changed,
+3,
-3
+3,
-3
1@@ -1,6 +1,6 @@
2 /* swc: launch/launch.c
3 *
4- * Copyright (c) 2013 Michael Forney
5+ * Copyright (c) 2013, 2014 Michael Forney
6 *
7 * Based in part upon weston-launch.c from weston which is:
8 *
9@@ -106,8 +106,8 @@ static void stop_devices(bool fatal)
10 {
11 if (ioctl(launcher.input_fds[index], EVIOCREVOKE, 0) == -1 && fatal)
12 {
13- perror("FATAL: Your kernel does not support EVIOCREVOKE; "
14- "input devices cannot be revoked");
15+ die("FATAL: Your kernel does not support EVIOCREVOKE; "
16+ "input devices cannot be revoked: %s", strerror(errno));
17 }
18 close(launcher.input_fds[index]);
19 }