libtracefs: Fix typo in documentation
PATCH 1/2 libtracefs: Fix typo in documentation
The typo in the name of the API was fixed already, but we need to change/fix the documentation as well.
Fixes 5c013e7 (libtracefs: New APIs for trace options)
Fixes f415871 (libtracefs: Fix typo in function name)
Signed-off-by Yordan Karadzhov (VMware) <[email protected]>
--- Documentation/libtracefs-option-misc.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/libtracefs-option-misc.txt +5 -5
@@ -3,7 +3,7 @@ libtracefs(3) NAME ---- -tracefs_option_enable, tracefs_option_diasble, tracefs_option_name - +tracefs_option_enable, tracefs_option_disable, tracefs_option_name - Various trace option functions. SYNOPSIS
@@ -13,7 +13,7 @@ SYNOPSIS *#include <tracefs.h>* int *tracefs_option_enable*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); -int *tracefs_option_diasble*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); +int *tracefs_option_disable*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); const char pass:[*]*tracefs_option_name*(enum tracefs_option_id _id_); --
@@ -24,7 +24,7 @@ This set of APIs can be used to enable and disable ftrace options and to get the The _tracefs_option_enable()_ function enables the option with _id_ in the given _instance_. If _instance_ is NULL, the option is enabled in the top trace instance. -The _tracefs_option_diasble()_ function disables the option with _id_ in the given _instance_. If +The _tracefs_option_disable()_ function disables the option with _id_ in the given _instance_. If _instance_ is NULL, the option is disabled in the top trace instance. The _tracefs_option_name()_ function returns a string, representing the option with _id_. The string
@@ -33,7 +33,7 @@ must *not* be freed. RETURN VALUE ------------ -The _tracefs_option_enable()_ and _tracefs_option_diasble()_ functions return 0 if the state of the +The _tracefs_option_enable()_ and _tracefs_option_disable()_ functions return 0 if the state of the option is set successfully, or -1 in case of an error. The _tracefs_option_name()_ function returns string with option name, or "unknown" in case of an
@@ -49,7 +49,7 @@ if (tracefs_option_enable(NULL, TRACEFS_OPTION_ANNOTATE)) { /* Failed to enable annotate option in top trace instance */ } ... -if (tracefs_option_diasble(NULL, TRACEFS_OPTION_CONTEXT_INFO)) { +if (tracefs_option_disable(NULL, TRACEFS_OPTION_CONTEXT_INFO)) { /* Failed to disable context info option in top trace instance */ } ...
Signature · 1 line
2.27.0
PATCH 2/2 libtracefs: Fix utest compilation
The typo in the name of the API was fixed in a previous patch, but we need to update the unit tests accordingly.
Fixes f415871 (libtracefs: Fix typo in function name)
Signed-off-by Yordan Karadzhov (VMware) <[email protected]>
--- utest/tracefs-utest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
utest/tracefs-utest.c +3 -3
@@ -729,7 +729,7 @@ static void test_instance_tracing_options(struct tracefs_instance *instance)CU_TEST (!tracefs_option_is_supported (instance,TRACEFS_OPTION_INVALID ));CU_TEST (!tracefs_option_is_enabled (instance,TRACEFS_OPTION_INVALID ));CU_TEST (tracefs_option_enable (instance,TRACEFS_OPTION_INVALID ) ==-1 ); -CU_TEST (tracefs_option_diasble (instance,TRACEFS_OPTION_INVALID ) ==-1 ); +CU_TEST (tracefs_option_disable (instance,TRACEFS_OPTION_INVALID ) ==-1 ); name =tracefs_option_name (TRACEFS_OPTION_INVALID );CU_TEST (!strcmp (name,"unknown" ));/* Test all valid options */
@@ -751,7 +751,7 @@ static void test_instance_tracing_options(struct tracefs_instance *instance)CU_TEST (check_option (instance, i, true,1 ));CU_TEST (tracefs_option_is_supported (instance, i));CU_TEST (tracefs_option_is_enabled (instance, i)); -CU_TEST (tracefs_option_diasble (instance, i) ==0 ); +CU_TEST (tracefs_option_disable (instance, i) ==0 );CU_TEST (check_option (instance, i, true,0 ));CU_TEST (tracefs_option_enable (instance, i) ==0 );CU_TEST (check_option (instance, i, true,1 ));
@@ -761,7 +761,7 @@ static void test_instance_tracing_options(struct tracefs_instance *instance)CU_TEST (!tracefs_option_is_enabled (instance, i));CU_TEST (tracefs_option_enable (instance, i) ==0 );CU_TEST (check_option (instance, i, true,1 )); -CU_TEST (tracefs_option_diasble (instance, i) ==0 ); +CU_TEST (tracefs_option_disable (instance, i) ==0 );CU_TEST (check_option (instance, i, true,0 )); } }
Signature · 1 line
2.27.0