Use baename(argv[0]) to get the program name (for usage), instead of
using program_invocation_short_name, which only exists on Linux, not
FreeBSD.
Signed-off-by: Niclas Zeising <zeising@daemonic.se>
tools/libevdev-tweak-device.c:390: uninit_use_in_call: Using uninitialized
value "changes" when calling "parse_options_abs".
tools/libevdev-tweak-device.c:376: warning: 'led' may be used uninitialized in
this function
tools/libevdev-tweak-device.c:375: warning: 'axis' may be used uninitialized
in this function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
So far, 100% of the usages for tweak-tool was to set the x/y resolution of a
device. Make --resolution a shortcut for this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Make the code base a bit more modular so it's easier to add new commands.
Main change here is: options are parsed twice now, first time for the mode
(abs/led) and the device path, then again for the mode-specific options.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>