X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttng-ring-buffer-client.h;h=9872ea4bc5be56f35b22c00eac7aa6aeab2b324c;hb=16f78f3ad7dea4a0b442b8c7e0de01935f28e656;hp=288cc32509dcde332f3aa3d9eab7b2a39b9b2f32;hpb=f0dbdefbdbc26a000ed546180b22144c5b48857d;p=lttng-modules.git diff --git a/lttng-ring-buffer-client.h b/lttng-ring-buffer-client.h index 288cc325..9872ea4b 100644 --- a/lttng-ring-buffer-client.h +++ b/lttng-ring-buffer-client.h @@ -628,6 +628,21 @@ void lttng_event_memset(struct lib_ring_buffer_ctx *ctx, lib_ring_buffer_memset(&client_config, ctx, c, len); } +static +void lttng_event_strcpy(struct lib_ring_buffer_ctx *ctx, const char *src, + size_t len) +{ + lib_ring_buffer_strcpy(&client_config, ctx, src, len, '#'); +} + +static +void lttng_event_strcpy_from_user(struct lib_ring_buffer_ctx *ctx, + const char __user *src, size_t len) +{ + lib_ring_buffer_strcpy_from_user_inatomic(&client_config, ctx, src, + len, '#'); +} + static wait_queue_head_t *lttng_get_writer_buf_wait_queue(struct channel *chan, int cpu) { @@ -669,6 +684,8 @@ static struct lttng_transport lttng_relay_transport = { .event_write = lttng_event_write, .event_write_from_user = lttng_event_write_from_user, .event_memset = lttng_event_memset, + .event_strcpy = lttng_event_strcpy, + .event_strcpy_from_user = lttng_event_strcpy_from_user, .packet_avail_size = NULL, /* Would be racy anyway */ .get_writer_buf_wait_queue = lttng_get_writer_buf_wait_queue, .get_hp_wait_queue = lttng_get_hp_wait_queue,