uinput.c (93badfa1f2c7f97efac0842c59cccac862dfe112) uinput.c (886f6623f62df1b086675c1efc6465ca09d46b42)
1/*-
2 * Copyright (c) 2014 Jakub Wojciech Klama <jceel@FreeBSD.org>
3 * Copyright (c) 2015-2016 Vladimir Kondratyev <wulf@cicgroup.ru>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 513 unchanged lines hidden (view full) ---

522 return (uinput_setup_dev(state, &us->id, us->name,
523 us->ff_effects_max));
524
525 case UI_ABS_SETUP:
526 if (state->ucs_state == UINPUT_RUNNING)
527 return (EINVAL);
528
529 uabs = (struct uinput_abs_setup *)data;
1/*-
2 * Copyright (c) 2014 Jakub Wojciech Klama <jceel@FreeBSD.org>
3 * Copyright (c) 2015-2016 Vladimir Kondratyev <wulf@cicgroup.ru>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 513 unchanged lines hidden (view full) ---

522 return (uinput_setup_dev(state, &us->id, us->name,
523 us->ff_effects_max));
524
525 case UI_ABS_SETUP:
526 if (state->ucs_state == UINPUT_RUNNING)
527 return (EINVAL);
528
529 uabs = (struct uinput_abs_setup *)data;
530 if (uabs->code > ABS_MAX || uabs->code < 0)
530 if (uabs->code > ABS_MAX)
531 return (EINVAL);
532
533 evdev_support_abs(state->ucs_evdev, uabs->code,
534 uabs->absinfo.value, uabs->absinfo.minimum,
535 uabs->absinfo.maximum, uabs->absinfo.fuzz,
536 uabs->absinfo.flat, uabs->absinfo.resolution);
537 return (0);
538

--- 172 unchanged lines hidden ---
531 return (EINVAL);
532
533 evdev_support_abs(state->ucs_evdev, uabs->code,
534 uabs->absinfo.value, uabs->absinfo.minimum,
535 uabs->absinfo.maximum, uabs->absinfo.fuzz,
536 uabs->absinfo.flat, uabs->absinfo.resolution);
537 return (0);
538

--- 172 unchanged lines hidden ---