Merge lp:~peter-hutterer/evemu/evemu-event-v2 into lp:evemu
Status: | Rejected |
---|---|
Rejected by: | Chase Douglas |
Proposed branch: | lp:~peter-hutterer/evemu/evemu-event-v2 |
Merge into: | lp:evemu |
Diff against target: |
300 lines (+192/-3) 7 files modified
.bzrignore (+2/-0) include/evemu.h (+17/-0) src/evemu.c (+17/-0) src/libutouch-evemu.ver (+2/-0) tools/Makefile.am (+2/-1) tools/evemu-device.txt (+7/-2) tools/evemu-event.c (+145/-0) |
To merge this branch: | bzr merge lp:~peter-hutterer/evemu/evemu-event-v2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chase Douglas (community) | Needs Fixing | ||
Review via email: mp+108866@code.launchpad.net |
Description of the change
Updated branch for evemu-event. Changes to v1:
- evemu_play_
- use getopt parsing (changes the user interface, but this is a new tool anyways)
- check for strtol failures
- check input ranges
- check EV_SYN event sending, use EV_SYN/SYN_REPORT as type/code instead of 0/0
Unmerged revisions
- 60. By Peter Hutterer
-
Use getopt for option parsing
This is a change in the user interface, the arguments must now be specified
instead of just listed in the correct order. - 59. By Peter Hutterer
-
Range-check argument values for evemu-event
type must be less than EV_MAX
code's maximum is effectively KEY_MAX but let's use USHRT_MAX to be safe for
future key additions
value is int value range - 58. By Peter Hutterer
-
Don't open the device until we've parsed all arguments successfully
- 57. By Peter Hutterer
-
Check arguments' strtol conversion for errors
- 56. By Peter Hutterer
-
Always close the fd, even on errors.
- 55. By Peter Hutterer
-
Print errors if SYN event creation/playback failed
- 54. By Peter Hutterer
-
Use EV_SYN and SYN_REPORT instead of 0/0
- 53. By Peter Hutterer
-
Add evemu-event to play a single event from the commandline
Some testing scenarios require specific events to be generated that are hard
to create from a physical device (e.g. touchpad motion purely on the
positive X axis with no Y axis). For those scenarios, recording a device and
hacking the evemu event files is time consuming.evemu-event simply allows this scenario to be scripted.
- 52. By Thomas Voß
-
Fixed failing tests for device creation.
- 51. By Stephen M. Webb
-
release 1.0.9
* This comment doesn't make sense:
if (c == -1) /* we only do long options */
I would rather be able to support both short and long options, and the code does seem to support both if I am reading the getopt_long manpage correctly. I suggest we just remove the comment.
* The getopt switch needs a default: clause to catch bad options. Right now it looks like it would just skip over bad options. I suggest adding:
default:
usage();
goto out;
* I had never heard of program_ invocation_ short_name before. I learned something new today! It looks like we should be defining _GNU_SOURCE above the include of error.h.
* If the device is specified as an option, and then one non-option string is provided at the end, the non-option string will overwrite the device path. We need to add a check for if the device path has already been specified before assuming the last argument is the path.
* The usage string and man pages need to be updated so they note that you either provide the device path as an option or you provide the path as the last argument. I don't think the code will work otherwise.