Implement --shm-path option for UST sessions (per-uid channels)
[lttng-tools.git] / src / common / consumer.c
index 0af994fc421c5b00c4ca11615cee2c9220aa5466..1cb1c47431303e6ed3c516948a78b5807855c48c 100644 (file)
@@ -936,7 +936,8 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
                uint64_t tracefile_count,
                uint64_t session_id_per_pid,
                unsigned int monitor,
-               unsigned int live_timer_interval)
+               unsigned int live_timer_interval,
+               const char *shm_path)
 {
        struct lttng_consumer_channel *channel;
 
@@ -993,6 +994,11 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
        strncpy(channel->name, name, sizeof(channel->name));
        channel->name[sizeof(channel->name) - 1] = '\0';
 
+       if (shm_path) {
+               strncpy(channel->shm_path, shm_path, sizeof(channel->shm_path));
+               channel->shm_path[sizeof(channel->shm_path) - 1] = '\0';
+       }
+
        lttng_ht_node_init_u64(&channel->node, channel->key);
 
        channel->wait_fd = -1;
This page took 0.024118 seconds and 5 git commands to generate.