Add unsupported error code to lttng cmd line
[lttng-tools.git] / src / bin / lttng / commands / enable_events.c
index 1a53448c647ebd8469871b916258726649a78c5b..ff9d29472c7986387949e449dba2db18180e71a9 100644 (file)
@@ -255,7 +255,7 @@ int loglevel_str_to_value(const char *inputstr)
        int i = 0;
        char str[LTTNG_SYMBOL_NAME_LEN];
 
-       while (inputstr[i] != '\0' && i < LTTNG_SYMBOL_NAME_LEN) {
+       while (i < LTTNG_SYMBOL_NAME_LEN && inputstr[i] != '\0') {
                str[i] = toupper(inputstr[i]);
                i++;
        }
@@ -494,7 +494,7 @@ static int enable_events(char *session_name)
 
                        if (opt_loglevel) {
                                MSG("Kernel loglevels are not supported.");
-                               ret = CMD_UNDEFINED;
+                               ret = CMD_UNSUPPORTED;
                                goto error;
                        }
 
@@ -527,7 +527,7 @@ static int enable_events(char *session_name)
                        case LTTNG_EVENT_SYSCALL:
                        default:
                                ERR("Event type not available for user-space tracing");
-                               ret = CMD_UNDEFINED;
+                               ret = CMD_UNSUPPORTED;
                                goto error;
                        }
 
This page took 0.025136 seconds and 4 git commands to generate.