diff options
author | Andi Shyti <andi.shyti@samsung.com> | 2017-02-10 08:50:00 +0900 |
---|---|---|
committer | Andi Shyti <andi.shyti@samsung.com> | 2017-02-10 08:50:00 +0900 |
commit | 4a23142c97f061a4e8098f257655288c2307e358 (patch) | |
tree | 4962f7cbc9bf81e13d6d5346a8db1405a591d10f | |
parent | 5d416127619c92a3ec92a1dad2b3f6353009f2e5 (diff) |
stmfts: add mask for EV_ABS filtering
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
-rw-r--r-- | stmfts.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -228,7 +228,8 @@ void stmfts_print_usage(char *argv) int main(int argc, char *argv[]) { - int fd; + int fd, err; + struct input_mask mask; if (argc != 2) { error(0, EPERM, "missing event name"); @@ -242,6 +243,16 @@ int main(int argc, char *argv[]) return -1; } + mask.type = EV_ABS; + mask.codes_size = 0; + mask.codes_ptr = 0; + + err = ioctl(fd, EVIOCSMASK, &mask); + if (err < 0) { + error(0, EFAULT, "ioctl failed"); + return -1; + } + fd = stmfts_read_event(fd); if (fd) { fprintf(stderr, "something went wrong\n"); |