Fix: handle loglevel range ALL in list command
authorDavid Goulet <dgoulet@efficios.com>
Thu, 27 Feb 2014 20:04:53 +0000 (15:04 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 27 Feb 2014 20:04:53 +0000 (15:04 -0500)
Print the ":" if we get the ALL range and not TYPE UNKNOWN.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/list.c

index 1a46bb72b221f2d75f9cd82ea94a13b3ef457450..f69b3ba3d67b1b8ce5a2b02b839d032f306f4a0e 100644 (file)
@@ -220,12 +220,14 @@ static const char *loglevel_string(int value)
 static const char *logleveltype_string(enum lttng_loglevel_type value)
 {
        switch (value) {
+       case LTTNG_EVENT_LOGLEVEL_ALL:
+               return ":";
        case LTTNG_EVENT_LOGLEVEL_RANGE:
-               return "<=";
+               return " <=";
        case LTTNG_EVENT_LOGLEVEL_SINGLE:
-               return "==";
+               return " ==";
        default:
-               return "<<TYPE UNKN>>";
+               return " <<TYPE UNKN>>";
        }
 }
 
@@ -238,7 +240,7 @@ static void print_events(struct lttng_event *event)
        case LTTNG_EVENT_TRACEPOINT:
        {
                if (event->loglevel != -1) {
-                       MSG("%s%s (loglevel %s %s (%d)) (type: tracepoint)%s%s%s",
+                       MSG("%s%s (loglevel%s %s (%d)) (type: tracepoint)%s%s%s",
                                indent6,
                                event->name,
                                logleveltype_string(event->loglevel_type),
This page took 0.026497 seconds and 4 git commands to generate.