Remove default defines from lttng.h
authorDavid Goulet <dgoulet@efficios.com>
Tue, 24 Jan 2012 22:43:54 +0000 (17:43 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 24 Jan 2012 22:43:54 +0000 (17:43 -0500)
They were not use in lttng.h and of no use for the user also. They are
all moved to common/defaults.h.

Signed-off-by: David Goulet <dgoulet@efficios.com>
include/lttng/lttng.h
src/bin/lttng-sessiond/main.c
src/bin/lttng/commands/create.c
src/bin/lttng/lttng.c
src/common/defaults.h
src/lib/lttng-ctl/lttng-ctl.c

index 8bdfe121c44bdce2acac16e3b5699e4848310cbf..71e754018cc096c354e2506d001aa12a97d0bd09 100644 (file)
 #include <stdint.h>
 #include <sys/types.h>
 
-/* Default unix group name for tracing. */
-#define LTTNG_DEFAULT_TRACING_GROUP "tracing"
-
-/* Environment variable to set session daemon binary path. */
-#define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH"
-
-/* Default trace output directory name */
-#define LTTNG_DEFAULT_TRACE_DIR_NAME "lttng-traces"
-
 /*
  * Event symbol length. Copied from LTTng kernel ABI.
  */
index 0e92327cd30392102617b3f343b2dd7b113d8cbb..4e5771f03639b476748c97a459e8c7aab0829fee 100644 (file)
@@ -77,7 +77,7 @@ struct consumer_data {
 
 /* Const values */
 const char default_home_dir[] = DEFAULT_HOME_DIR;
-const char default_tracing_group[] = LTTNG_DEFAULT_TRACING_GROUP;
+const char default_tracing_group[] = DEFAULT_TRACING_GROUP;
 const char default_ust_sock_dir[] = DEFAULT_UST_SOCK_DIR;
 const char default_global_apps_pipe[] = DEFAULT_GLOBAL_APPS_PIPE;
 
index 0765c823b4209bf4b947a61772837cf1ca7e4947..34754c7ca139f40077b6ea6e4cb6d81852257e88 100644 (file)
@@ -101,10 +101,10 @@ static int create_session()
                }
 
                if (have_name) {
-                       ret = asprintf(&traces_path, "%s/" LTTNG_DEFAULT_TRACE_DIR_NAME
+                       ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
                                        "/%s-%s", alloc_path, session_name, datetime);
                } else {
-                       ret = asprintf(&traces_path, "%s/" LTTNG_DEFAULT_TRACE_DIR_NAME
+                       ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
                                        "/%s", alloc_path, session_name);
                }
 
index 6e16995a9d71a88e332e8f616e8971acb7628a75..a8cc2e72ff1ef1809d7941e5870ffde1418e9d88 100644 (file)
@@ -351,7 +351,7 @@ static int check_sessiond(void)
                        pathname = opt_sessiond_path;
                } else {
                        /* Try LTTNG_SESSIOND_PATH env variable */
-                       pathname = getenv(LTTNG_SESSIOND_PATH_ENV);
+                       pathname = getenv(DEFAULT_SESSIOND_PATH_ENV);
                }
 
                /* Let's rock and roll */
index b15bdc9e2cb6b35ac4c67b8f0f4447726cd82d1a..aa383b32666ce73bb0c462b09e2328695b5f532e 100644 (file)
 #ifndef _DEFAULTS_H
 #define _DEFAULTS_H
 
+/* Default unix group name for tracing. */
+#define DEFAULT_TRACING_GROUP                   "tracing"
+
+/* Environment variable to set session daemon binary path. */
+#define DEFAULT_SESSIOND_PATH_ENV               "LTTNG_SESSIOND_PATH"
+
+/* Default trace output directory name */
+#define DEFAULT_TRACE_DIR_NAME                  "lttng-traces"
+
 /* Default size of a hash table */
 #define DEFAULT_HT_SIZE                         4
 
index 0858c1a74ef6ce1f2c312e832e0d1b43cc6aac2f..b7fc781610f9b214422d84bc5a9a34f97bb2b059 100644 (file)
@@ -906,5 +906,5 @@ int lttng_session_daemon_alive(void)
 static void __attribute__((constructor)) init()
 {
        /* Set default session group */
-       lttng_set_tracing_group(LTTNG_DEFAULT_TRACING_GROUP);
+       lttng_set_tracing_group(DEFAULT_TRACING_GROUP);
 }
This page took 0.03225 seconds and 5 git commands to generate.