]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rtla/osnoise: Distinguish missing workload option
authorTomas Glozar <tglozar@redhat.com>
Tue, 7 Jan 2025 14:48:21 +0000 (15:48 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 24 Jan 2025 18:45:45 +0000 (13:45 -0500)
osnoise_set_workload returns -1 for both missing OSNOISE_WORKLOAD option
and failure in setting the option.

Return -1 for missing and -2 for failure to distinguish them.

Cc: stable@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Link: https://lore.kernel.org/20250107144823.239782-2-tglozar@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/tracing/rtla/src/osnoise.c

index 245e9344932bc4dcbc58192371431c81a353215e..699a83f538a8e88686a0a9d68518909aff80b3a3 100644 (file)
@@ -867,7 +867,7 @@ int osnoise_set_workload(struct osnoise_context *context, bool onoff)
 
        retval = osnoise_options_set_option("OSNOISE_WORKLOAD", onoff);
        if (retval < 0)
-               return -1;
+               return -2;
 
        context->opt_workload = onoff;