linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] libtracefs: Fix typo in documentation
@ 2021-06-21  8:49 Yordan Karadzhov (VMware)
  2021-06-21  8:49 ` [PATCH 2/2] libtracefs: Fix utest compilation Yordan Karadzhov (VMware)
  0 siblings, 1 reply; 2+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-06-21  8:49 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov (VMware)

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) <y.karadz@gmail.com>
---
 Documentation/libtracefs-option-misc.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/libtracefs-option-misc.txt b/Documentation/libtracefs-option-misc.txt
index 1cd7c88..4258910 100644
--- a/Documentation/libtracefs-option-misc.txt
+++ b/Documentation/libtracefs-option-misc.txt
@@ -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 */
 }
 ...
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] libtracefs: Fix utest compilation
  2021-06-21  8:49 [PATCH 1/2] libtracefs: Fix typo in documentation Yordan Karadzhov (VMware)
@ 2021-06-21  8:49 ` Yordan Karadzhov (VMware)
  0 siblings, 0 replies; 2+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-06-21  8:49 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov (VMware)

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) <y.karadz@gmail.com>
---
 utest/tracefs-utest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index 9186656..a982b1d 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -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));
 		}
 	}
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-21  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  8:49 [PATCH 1/2] libtracefs: Fix typo in documentation Yordan Karadzhov (VMware)
2021-06-21  8:49 ` [PATCH 2/2] libtracefs: Fix utest compilation Yordan Karadzhov (VMware)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).