diff mbox series

[v3,03/11] trace2: add a public function for getting the SID

Message ID 227c709ba54ee457f05704e52310b39edeaae1ca.1605136908.git.steadmon@google.com (mailing list archive)
State Accepted
Commit e97e1cf464fa0c4646d41b9221ae88a7dca12493
Headers show
Series Advertise session ID in protocol capabilities | expand

Commit Message

Josh Steadmon Nov. 11, 2020, 11:29 p.m. UTC
Add a public wrapper, trace2_session_id(), around tr2_sid_get(), which
is intended to be private trace2 implementation.

Signed-off-by: Josh Steadmon <steadmon@google.com>
---
 trace2.c | 5 +++++
 trace2.h | 2 ++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/trace2.c b/trace2.c
index 2c6b570077..256120c7fd 100644
--- a/trace2.c
+++ b/trace2.c
@@ -792,3 +792,8 @@  void trace2_printf(const char *fmt, ...)
 	va_end(ap);
 }
 #endif
+
+const char *trace2_session_id(void)
+{
+	return tr2_sid_get();
+}
diff --git a/trace2.h b/trace2.h
index b18bc5529c..ede18c2e06 100644
--- a/trace2.h
+++ b/trace2.h
@@ -500,4 +500,6 @@  void trace2_collect_process_info(enum trace2_process_info_reason reason);
 	} while (0)
 #endif
 
+const char *trace2_session_id(void);
+
 #endif /* TRACE2_H */