lttng view is a frontend command, when the viewer is not found in the
path, the error message should be human readable (no need for the
developper-oriented debug message).
Also the return code must indicate that something went wrong if the
viewer is not on the system.
(fix #144)
Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
ret = execvp(viewer_bin, argv);
if (ret) {
- PERROR("exec: %s", viewer_bin);
+ if (errno == ENOENT) {
+ ERR("%s not found on the system", viewer_bin);
+ } else {
+ PERROR("exec: %s", viewer_bin);
+ }
free(argv);
ret = CMD_FATAL;
goto error;
goto free_sessions;
}
- ret = CMD_SUCCESS;
-
free_sessions:
if (sessions) {
free(sessions);