Skip to content

Commit

Permalink
rtla/osnoise: Distinguish missing workload option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Glozar authored and Steven Rostedt (Google) committed Jan 24, 2025
1 parent 80967b3 commit 80d3ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tracing/rtla/src/osnoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 80d3ba1

Please sign in to comment.