X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fview.c;h=dc37a09ddb58f83f01757dc5e89c75a46fa2deb9;hb=44c1a903e17ad14d5ba1cd07585a7a2415eac78a;hp=1de6940aa8c1612342ba53a56f9e36c7329609e5;hpb=879ba54843fc94133be5ce15b4c73b5fdd6d4f98;p=lttng-tools.git diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index 1de6940aa..dc37a09dd 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -258,17 +258,6 @@ static int spawn_viewer(const char *trace_path) argv = alloc_argv_from_local_opts(babeltrace_opts, ARRAY_SIZE(babeltrace_opts), trace_path); break; -#if 0 - case VIEWER_LTTV_GUI: - if (stat(lttv_gui_bin, &status) == 0) { - viewer_bin = lttv_gui_bin; - } else { - viewer_bin = viewer->exec_name; - } - argv = alloc_argv_from_local_opts(lttv_gui_opts, - ARRAY_SIZE(lttv_gui_opts), trace_path); - break; -#endif case VIEWER_USER_DEFINED: argv = alloc_argv_from_user_opts(opt_viewer, trace_path); if (argv) { @@ -282,7 +271,7 @@ static int spawn_viewer(const char *trace_path) break; } - if (argv == NULL) { + if (argv == NULL || !viewer_bin) { ret = CMD_FATAL; goto error; } @@ -316,14 +305,14 @@ static char *build_live_path(char *session_name) ret = gethostname(hostname, sizeof(hostname)); if (ret < 0) { - perror("gethostname"); + PERROR("gethostname"); goto error; } ret = asprintf(&path, "net://localhost/host/%s/%s", hostname, session_name); if (ret < 0) { - perror("asprintf live path"); + PERROR("asprintf live path"); goto error; }