From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 7/9 v2] trace-cmd: Have tracecmd_get_file_state() return the enum
Date: Fri, 05 Mar 2021 17:52:30 -0500 [thread overview]
Message-ID: <20210305225948.293719864@goodmis.org> (raw)
In-Reply-To: 20210305225223.794554327@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Instead of returning an unsigned long for tracecmd_get_file_state(), have it
return the enum, now that it is a required API.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
lib/trace-cmd/include/private/trace-cmd-private.h | 2 +-
lib/trace-cmd/trace-input.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h
index ad863df8954f..bd14caff93ac 100644
--- a/lib/trace-cmd/include/private/trace-cmd-private.h
+++ b/lib/trace-cmd/include/private/trace-cmd-private.h
@@ -163,7 +163,7 @@ int tracecmd_copy_headers(struct tracecmd_input *handle, int fd);
void tracecmd_set_flag(struct tracecmd_input *handle, int flag);
void tracecmd_clear_flag(struct tracecmd_input *handle, int flag);
unsigned long tracecmd_get_flags(struct tracecmd_input *handle);
-unsigned long tracecmd_get_file_state(struct tracecmd_input *handle);
+enum tracecmd_file_states tracecmd_get_file_state(struct tracecmd_input *handle);
unsigned long long tracecmd_get_tsync_peer(struct tracecmd_input *handle);
int tracecmd_enable_tsync(struct tracecmd_input *handle, bool enable);
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
index 1dcefc61bcbb..b4d18209fe2d 100644
--- a/lib/trace-cmd/trace-input.c
+++ b/lib/trace-cmd/trace-input.c
@@ -162,7 +162,7 @@ unsigned long tracecmd_get_flags(struct tracecmd_input *handle)
return handle->flags;
}
-unsigned long tracecmd_get_file_state(struct tracecmd_input *handle)
+enum tracecmd_file_states tracecmd_get_file_state(struct tracecmd_input *handle)
{
return handle->file_state;
}
--
2.30.0
next prev parent reply other threads:[~2021-03-05 23:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 22:52 [PATCH 0/9 v2] trace-cmd: Fixes for trace-cmd restore Steven Rostedt
2021-03-05 22:52 ` [PATCH 1/9 v2] trace-cmd restore: Fix to add saved cmdlines after calling tracecmd_create_init_file_override() Steven Rostedt
2021-03-05 22:52 ` [PATCH 2/9 v2] trace-cmd: Move tracecmd_write_cmdlines() out of tracecmd_append_cpu_data() Steven Rostedt
2021-03-05 22:52 ` [PATCH 3/9 v2] trace-cmd: Move the output state updates into the functions that change the state Steven Rostedt
2021-03-05 22:52 ` [PATCH 4/9 v2] trace-cmd: Move the input " Steven Rostedt
2021-03-05 22:52 ` [PATCH 5/9 v2] trace-cmd input: Validate the input handle when copying from it Steven Rostedt
2021-03-05 22:52 ` [PATCH 6/9 v2] trace-cmd: Have tracecmd_read_headers() specify the state to read up to Steven Rostedt
2021-03-05 22:52 ` Steven Rostedt [this message]
2021-03-05 22:52 ` [PATCH 8/9 v2] trace-cmd input: Add validation updates to the copy of a handle Steven Rostedt
2021-03-05 22:52 ` [PATCH 9/9 v2] trace-cmd: Have tracecmd_copy_headers() have a start and stop state 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=20210305225948.293719864@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 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).