X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fview.c;h=2326389631902134b8a85276ee50b25902b55f8a;hb=2436ad01db5c2539639e9e4c367bad7b2341c191;hp=b9f3553b32511fd142de47f71a1e6468a24a105e;hpb=b53d4e59bf0a980aa774dcccc27123986e77b8ff;p=deliverable%2Flttng-tools.git diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index b9f3553b3..232638963 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -58,11 +58,7 @@ enum viewer_type { VIEWER_USER_DEFINED = 2, }; -/* - * NOTE: "lttv" is a shell command and it's not working for exec() family - * functions so we might think of removing this wrapper or using bash. - */ -static const struct viewers { +static const struct viewer { const char *exec_name; enum viewer_type type; } viewers[] = { @@ -74,18 +70,13 @@ static const struct viewers { /* Is the session we are trying to view is in live mode. */ static int session_live_mode; -static const struct viewers *parse_options(void) +static const struct viewer *parse_options(void) { if (opt_viewer == NULL) { /* Default is babeltrace */ return &(viewers[VIEWER_BABELTRACE2]); } - /* - * This means that if -e, --viewers is used, we just override everything - * with it. For supported viewers like lttv, we could simply detect if "-t" - * is passed and if not, add the trace directory to it. - */ return &(viewers[VIEWER_USER_DEFINED]); } @@ -201,7 +192,7 @@ static int spawn_viewer(const char *trace_path) int ret = 0; struct stat status; const char *viewer_bin = NULL; - const struct viewers *viewer; + const struct viewer *viewer; char **argv = NULL; /* Check for --viewer options */