14 lines
319 B
Diff
14 lines
319 B
Diff
Author: <agx@sigxcpu.org>
|
|
Description: Fix write error detection
|
|
--- a/mouseemu.c
|
|
+++ b/mouseemu.c
|
|
@@ -92,7 +92,7 @@
|
|
|
|
static void passthrough(int fd, struct input_event event)
|
|
{
|
|
- if (write(fd, &event, sizeof(event)) < sizeof(event))
|
|
+ if (write(fd, &event, sizeof(event)) <= 0)
|
|
perror("passthrough error");
|
|
|
|
}
|