input: fix open() call parameters
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 31 Dec 2011 15:24:14 +0000 (16:24 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 31 Dec 2011 15:27:37 +0000 (16:27 +0100)
Third argument of open() is for file creation flags and nor for file open flags.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/input.c

index 445834e..36d491e 100644 (file)
@@ -148,7 +148,7 @@ int kmscon_input_device_wake_up(struct kmscon_input_device *device)
        if (device->fd)
                return 0;
 
-       device->rfd = open(device->devnode, O_CLOEXEC | O_NONBLOCK, O_RDONLY);
+       device->rfd = open(device->devnode, O_CLOEXEC | O_NONBLOCK | O_RDONLY);
        if (device->rfd < 0) {
                log_warning("input: cannot open input device %s: %d\n",
                                                device->devnode, errno);