mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 18:58:03 +02:00
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 <peter.hutterer@who-t.net>
(cherry picked from commit 92aa1d1418)
This commit is contained in:
parent
73c9ed2cd9
commit
1593d7da32
1 changed files with 14 additions and 5 deletions
|
|
@ -510,11 +510,20 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv)
|
||||||
setup_path();
|
setup_path();
|
||||||
|
|
||||||
rc = execvp(executable, argv);
|
rc = execvp(executable, argv);
|
||||||
if (rc)
|
if (rc) {
|
||||||
fprintf(stderr,
|
if (errno == ENOENT) {
|
||||||
"Failed to execute '%s' (%s)\n",
|
fprintf(stderr,
|
||||||
command,
|
"libinput: %s is not a libinput command or not installed. "
|
||||||
strerror(errno));
|
"See 'libinput --help'\n",
|
||||||
|
command);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
fprintf(stderr,
|
||||||
|
"Failed to execute '%s' (%s)\n",
|
||||||
|
command,
|
||||||
|
strerror(errno));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue