All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: [PATCH 08/11] libtracefs: Add documentation for tracefs_option_id()
Date: Tue, 22 Feb 2022 19:30:09 -0500	[thread overview]
Message-ID: <20220223003012.1334741-9-rostedt@goodmis.org> (raw)
In-Reply-To: <20220223003012.1334741-1-rostedt@goodmis.org>

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The function tracefs_option_id() is missing from the man pages.

Add it.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 Documentation/libtracefs-option-get.txt | 11 +++++++++--
 Documentation/libtracefs.txt            |  1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/libtracefs-option-get.txt b/Documentation/libtracefs-option-get.txt
index dce5afab4894..8a688a7dd8f2 100644
--- a/Documentation/libtracefs-option-get.txt
+++ b/Documentation/libtracefs-option-get.txt
@@ -3,8 +3,8 @@ libtracefs(3)
 
 NAME
 ----
-tracefs_options_get_supported, tracefs_option_is_supported,
-tracefs_options_get_enabled, tracefs_option_is_enabled, tracefs_option_mask_is_set
+tracefs_options_get_supported, tracefs_option_is_supported, tracefs_options_get_enabled,
+tracefs_option_is_enabled, tracefs_option_mask_is_set, tracefs_option_id
 - Get and check ftrace options.
 
 SYNOPSIS
@@ -18,6 +18,7 @@ bool *tracefs_option_is_supported*(struct tracefs_instance pass:[*]_instance_, e
 const struct tracefs_options_mask pass:[*]*tracefs_options_get_enabled*(struct tracefs_instance pass:[*]_instance_);
 bool *tracefs_option_is_enabled*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_);
 bool *tracefs_option_mask_is_set*(const struct tracefs_options_mask *options, enum tracefs_option_id id);
+enum tracefs_option_id *tracefs_option_id*(const char pass:[*]_name_);
 --
 
 DESCRIPTION
@@ -43,6 +44,9 @@ given _instance_. If _instance_ is NULL, the top trace instance is used.
 The *tracefs_option_mask_is_set()* function checks if the bit, corresponding to the option with _id_ is
 set in the _options_ bitmask returned from *tracefs_option_get_enabled()* and *tracefs_option_is_supported()*.
 
+The *tracefs_option_id()* converts an option _name_ into its corresponding id, if it is found.
+This allows to find the option _id_ to use in the other functions if only the _name_ is known.
+
 RETURN VALUE
 ------------
 The *tracefs_options_get_supported()* and *tracefs_options_get_enabled()* functions, on success,
@@ -56,6 +60,9 @@ option in supported / enabled, or false otherwise.
 The *tracefs_option_mask_is_set()* returns true if the corresponding option is set in the mask
 or false otherwise.
 
+The *tracefs_option_id()* returns the corresponding id defined by *tracefs_options*(3) from
+the given _name_. If the _name_ can not be found, then TRACEFS_OPTION_INVALID is returned.
+
 EXAMPLE
 -------
 [source,c]
diff --git a/Documentation/libtracefs.txt b/Documentation/libtracefs.txt
index 0e339af60f4f..44629e32d202 100644
--- a/Documentation/libtracefs.txt
+++ b/Documentation/libtracefs.txt
@@ -97,6 +97,7 @@ Trace options:
 	int *tracefs_option_enable*(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_);
+	enum tracefs_option_id *tracefs_option_id*(const char pass:[*]_name_);
 
 Ftrace tracers:
 	char pass:[*]pass:[*]*tracefs_tracers*(const char pass:[*]_tracing_dir_);
-- 
2.34.1


  parent reply	other threads:[~2022-02-23  0:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23  0:30 [PATCH 00/11] libtracefs: Add man page checks and upate man pages Steven Rostedt
2022-02-23  0:30 ` [PATCH 01/11] libtracefs: Update main man page for all functions Steven Rostedt
2022-02-23  0:30 ` [PATCH 02/11] libtracefs: Do not check libtracefs-options.txt man page Steven Rostedt
2022-02-23  0:30 ` [PATCH 03/11] libtracefs: Have check-manpages.sh check tracefs.h as well Steven Rostedt
2022-02-23  0:30 ` [PATCH 04/11] libtracefs: Add documentation for tracefs_instances() Steven Rostedt
2022-02-23  0:30 ` [PATCH 05/11] libtracefs: Hide tracefs_list_pop() and make it trace_list_pop() Steven Rostedt
2022-02-23  0:30 ` [PATCH 06/11] libtracefs: Add documentation for tracefs_list_add/size() Steven Rostedt
2022-02-23  0:30 ` [PATCH 07/11] libtracefs: Add documentation for tracefs_iterate_stop() Steven Rostedt
2022-02-23  0:30 ` Steven Rostedt [this message]
2022-02-23  0:30 ` [PATCH 09/11] libtracefs: Add man pages for tracefs_event_file_*() functions Steven Rostedt
2022-02-23  0:30 ` [PATCH 10/11] libtracefs: Do not check for deprecated functions Steven Rostedt
2022-02-23  0:30 ` [PATCH 11/11] libtracefs: Run the check-manpages.sh on building of docs Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220223003012.1334741-9-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.