summaryrefslogtreecommitdiff
path: root/tools/libinput-tool.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-05-25 16:07:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-02 12:21:35 +1000
commit4508e29a47019a8aa33d9c08eddc55f81b76c17a (patch)
tree16ac0244ba0c5c165d3c307512c9f1a98a5c980c /tools/libinput-tool.c
parent12a364a858ee602fdfa02f35f8396d29ae8f058d (diff)
downloadlibinput-4508e29a47019a8aa33d9c08eddc55f81b76c17a.tar.gz
tools: make the libinput tool usage static
This now makes the header obsolete too Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/libinput-tool.c')
-rw-r--r--tools/libinput-tool.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/libinput-tool.c b/tools/libinput-tool.c
index 3b7c87b6..f37d961e 100644
--- a/tools/libinput-tool.c
+++ b/tools/libinput-tool.c
@@ -35,10 +35,8 @@
#include <libinput-util.h>
#include <libinput-version.h>
-#include "libinput-tool.h"
-
-void
-libinput_tool_usage(void)
+static void
+usage(void)
{
printf("Usage: libinput [GLOBAL OPTIONS] [COMMAND] [ARGS]\n"
"\n"
@@ -99,7 +97,7 @@ exec_command(int real_argc, char **real_argv)
rc = snprintf(executable, sizeof(executable), "libinput-%s", command);
if (rc >= (int)sizeof(executable)) {
- libinput_tool_usage();
+ usage();
return EXIT_FAILURE;
}
@@ -137,19 +135,19 @@ main(int argc, char **argv)
switch(c) {
case 'h':
case GOPT_HELP:
- libinput_tool_usage();
+ usage();
return EXIT_SUCCESS;
case GOPT_VERSION:
printf("%s\n", LIBINPUT_VERSION);
return EXIT_SUCCESS;
default:
- libinput_tool_usage();
+ usage();
return EXIT_FAILURE;
}
}
if (optind >= argc) {
- libinput_tool_usage();
+ usage();
return EXIT_FAILURE;
}