Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
include/qb/qbrb.h | 7 +++++++
lib/ringbuffer.c | 5 +++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/qb/qbrb.h b/include/qb/qbrb.h
index 916656e..eb2fccc 100644
--- a/include/qb/qbrb.h
+++ b/include/qb/qbrb.h
@@ -126,6 +126,13 @@ qb_ringbuffer_t *qb_rb_open(const char *name, size_t size, uint32_t
flags);
void qb_rb_close(qb_ringbuffer_t * rb);
/**
+ * Get the name of the ringbuffer.
+ * @param rb ringbuffer instance
+ * @return name.
+ */
+char* qb_rb_name_get(qb_ringbuffer_t * rb);
+
+/**
* Write a chunk to the ring buffer.
*
* This simply calls qb_rb_chunk_alloc() and then
diff --git a/lib/ringbuffer.c b/lib/ringbuffer.c
index 5de6d04..8bbff84 100644
--- a/lib/ringbuffer.c
+++ b/lib/ringbuffer.c
@@ -226,6 +226,11 @@ void qb_rb_close(qb_ringbuffer_t * rb)
free(rb);
}
+char* qb_rb_name_get(qb_ringbuffer_t * rb)
+{
+ return rb->shared_hdr->hdr_path;
+}
+
static size_t _qb_rb_space_free_locked_(qb_ringbuffer_t * rb)
{
uint32_t write_size;
--
1.6.6.1