Commit 1593d7da authored by Peter Hutterer's avatar Peter Hutterer

tools: when the command isn't installed, print that

Makes it more user-friendly to be able to split the tools into multiple
packages
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 92aa1d14)
parent 73c9ed2c
......@@ -510,11 +510,20 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv)
setup_path();
rc = execvp(executable, argv);
if (rc)
fprintf(stderr,
"Failed to execute '%s' (%s)\n",
command,
strerror(errno));
if (rc) {
if (errno == ENOENT) {
fprintf(stderr,
"libinput: %s is not a libinput command or not installed. "
"See 'libinput --help'\n",
command);
} else {
fprintf(stderr,
"Failed to execute '%s' (%s)\n",
command,
strerror(errno));
}
}
return EXIT_FAILURE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment