Fix: lttng view, error message and exit code
[lttng-tools.git] / src / bin / lttng / commands / view.c
index 9e7c9d91e55d8127e4e09d43169dd35dc14cfaa7..9508743e62878ade2428905ba0bfdc9e831537f5 100644 (file)
@@ -258,7 +258,11 @@ static int spawn_viewer(const char *trace_path)
 
        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;
@@ -346,8 +350,6 @@ static int view_trace(void)
                goto free_sessions;
        }
 
-       ret = CMD_SUCCESS;
-
 free_sessions:
        if (sessions) {
                free(sessions);
This page took 0.023779 seconds and 4 git commands to generate.