Use default value for metadata file name
authorDavid Goulet <dgoulet@efficios.com>
Tue, 22 Jan 2013 19:57:24 +0000 (14:57 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 22 Jan 2013 19:57:24 +0000 (14:57 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/kernel-consumer.c
src/bin/lttng-sessiond/trace-ust.c
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-consumer.c
src/common/defaults.h

index 25f0e47998eebb85e753d249df947bbb02d1c72f..7fae5b0e96f08c2c1c1deb8197e4e9ec4f73c2e8 100644 (file)
@@ -124,7 +124,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        session->metadata->fd,
                        session->metadata->conf->attr.subbuf_size,
                        0, /* for kernel */
-                       "metadata",
+                       DEFAULT_METADATA_NAME,
                        1);
 
        health_code_update(&health_thread_kernel);
@@ -148,7 +148,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        session->gid,
                        consumer->net_seq_index,
                        1, /* Metadata flag set */
-                       "metadata",
+                       DEFAULT_METADATA_NAME,
                        pathname,
                        session->id);
 
index e07d27e678b93c718ff3dee1378706b3382a3692..81bf535f626c6996a730c7c9e3807773ae87ce93 100644 (file)
@@ -418,7 +418,7 @@ struct ltt_ust_metadata *trace_ust_create_metadata(char *path)
 
        lum->handle = -1;
        /* Set metadata trace path */
-       ret = snprintf(lum->pathname, PATH_MAX, "%s/metadata", path);
+       ret = snprintf(lum->pathname, PATH_MAX, "%s/" DEFAULT_METADATA_NAME, path);
        if (ret < 0) {
                PERROR("asprintf ust metadata");
                goto error_free_metadata;
index 9e6d81f2a3dd9229e72e5dca26a1b0dc4bb52d6c..f46183bd36da99afabc8dbd66eea619539f59e24 100644 (file)
@@ -1468,7 +1468,7 @@ static int create_ust_app_metadata(struct ust_app_session *ua_sess,
                }
 
                ret = snprintf(ua_sess->metadata->pathname, PATH_MAX,
-                               "%s/metadata", ua_sess->path);
+                               "%s/" DEFAULT_METADATA_NAME, ua_sess->path);
                if (ret < 0) {
                        PERROR("asprintf UST create stream");
                        goto error;
index ffa6429375b3d7c60d67f6545ce5c4a8e7d8d4e5..ea9c8570353501ec86cb8ef7335a593bd7cf7ccb 100644 (file)
@@ -227,7 +227,7 @@ static int send_metadata(struct consumer_socket *sock,
                        usess->metadata->obj->shm_fd,
                        usess->metadata->attr.subbuf_size,
                        usess->metadata->obj->memory_map_size,
-                       "metadata",
+                       DEFAULT_METADATA_NAME,
                        1);
 
        health_code_update(&health_thread_cmd);
@@ -289,7 +289,7 @@ static int send_metadata(struct consumer_socket *sock,
                        usess->gid,
                        consumer->net_seq_index,
                        1, /* Flag metadata set */
-                       "metadata",
+                       DEFAULT_METADATA_NAME,
                        pathname,
                        usess->id);
 
index 0dde5796470f975b3ede10544eb6318384422746..0e3aecf87c7ebcd1b9def4048bb0326aa4fb82c8 100644 (file)
 /* Default unix group name for tracing. */
 #define DEFAULT_TRACING_GROUP                   "tracing"
 
+/*
+ * This value is defined in the CTF specification (see
+ * git://git.efficios.com/ctf.git in the file
+ * common-trace-format-specification.txt.
+ */
+#define DEFAULT_METADATA_NAME                   "metadata"
+
 /* Environment variable to set session daemon binary path. */
 #define DEFAULT_SESSIOND_PATH_ENV               "LTTNG_SESSIOND_PATH"
 
This page took 0.030665 seconds and 4 git commands to generate.