|
@@ -403,6 +403,27 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd,
|
|
|
case EVIOCGID:
|
|
|
if (copy_to_user(p, &dev->id, sizeof(struct input_id)))
|
|
|
return -EFAULT;
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ case EVIOCGREP:
|
|
|
+ if (!test_bit(EV_REP, dev->evbit))
|
|
|
+ return -ENOSYS;
|
|
|
+ if (put_user(dev->rep[REP_DELAY], ip))
|
|
|
+ return -EFAULT;
|
|
|
+ if (put_user(dev->rep[REP_PERIOD], ip + 1))
|
|
|
+ return -EFAULT;
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ case EVIOCSREP:
|
|
|
+ if (!test_bit(EV_REP, dev->evbit))
|
|
|
+ return -ENOSYS;
|
|
|
+ if (get_user(u, ip))
|
|
|
+ return -EFAULT;
|
|
|
+ if (get_user(v, ip + 1))
|
|
|
+ return -EFAULT;
|
|
|
+
|
|
|
+ input_event(dev, EV_REP, REP_DELAY, u);
|
|
|
+ input_event(dev, EV_REP, REP_PERIOD, v);
|
|
|
|
|
|
return 0;
|
|
|
|