diff options
Diffstat (limited to 'common/evdev.c')
-rw-r--r-- | common/evdev.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/evdev.c b/common/evdev.c new file mode 100644 index 0000000..fe6922d --- /dev/null +++ b/common/evdev.c @@ -0,0 +1,15 @@ +#include <linux/input.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <sys/sysmacros.h> +#include <sys/types.h> + +#include "evdev.h" + +int evdev_revoke(int fd) { + return ioctl(fd, EVIOCREVOKE, NULL); +} + +int dev_is_evdev(dev_t device) { + return major(device) == 13; +} |