From f10719180ada8b6aec080a8f81aeae1b673edbb8 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Fri, 15 Jul 2011 16:22:13 -0400 Subject: [PATCH] Remove dependency on libuuid The session name is unique across all sessions so no need to use UUIDs from libuuid anymore. Signed-off-by: David Goulet --- README | 7 ------- configure.ac | 5 ----- ltt-sessiond/session.c | 32 -------------------------------- ltt-sessiond/session.h | 3 --- 4 files changed, 47 deletions(-) diff --git a/README b/README index a9b6dcb8c..af6e86488 100644 --- a/README +++ b/README @@ -10,13 +10,6 @@ Latest development can be found at: PREREQUISITES: - - libuuid - Universally unique id library - headers and static libraries libuuid - generates and parses 128-bit universally unique ids (UUIDs). See RFC - 4122 for more information. - - * Debian/Ubuntu package: uuid-dev - - liburcu Userspace RCU library, by Mathieu Desnoyers and Paul E. McKenney diff --git a/configure.ac b/configure.ac index be7a328f6..b7597be84 100644 --- a/configure.ac +++ b/configure.ac @@ -20,11 +20,6 @@ AC_CHECK_LIB([popt], [poptGetContext], [], [AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])] ) -# Check libuuid -AC_CHECK_LIB([uuid], [uuid_generate], [], - [AC_MSG_ERROR([Cannot find libuuid. Use [LDFLAGS]=-Ldir to specify its location.])] -) - # Check liburcu AC_CHECK_DECL([cds_list_add], [], [AC_MSG_ERROR([liburcu 0.5.4 or newer is needed])], [[#include ]] diff --git a/ltt-sessiond/session.c b/ltt-sessiond/session.c index be820ee55..f35530336 100644 --- a/ltt-sessiond/session.c +++ b/ltt-sessiond/session.c @@ -83,35 +83,6 @@ static void del_session_list(struct ltt_session *ls) } } -/* - * find_session_by_uuid - * - * Return a ltt_session structure ptr that matches the uuid. - */ -struct ltt_session *find_session_by_uuid(uuid_t session_id) -{ - int found = 0; - struct ltt_session *iter; - - /* Sanity check for NULL session_id */ - if (uuid_is_null(session_id)) { - goto end; - } - - cds_list_for_each_entry(iter, <t_session_list.head, list) { - if (uuid_compare(iter->uuid, session_id) == 0) { - found = 1; - break; - } - } - -end: - if (!found) { - iter = NULL; - } - return iter; -} - /* * find_session_by_name * @@ -223,9 +194,6 @@ int create_session(char *name, char *path) goto error; } - /* UUID generation */ - uuid_generate(new_session->uuid); - /* * Set consumer (identifier) to 0. This means that there is * NO consumer attach to that session yet. diff --git a/ltt-sessiond/session.h b/ltt-sessiond/session.h index 1e274b411..5845878cb 100644 --- a/ltt-sessiond/session.h +++ b/ltt-sessiond/session.h @@ -21,7 +21,6 @@ #include #include -#include /* Global session list */ struct ltt_session_list { @@ -37,7 +36,6 @@ struct ltt_session { struct cds_list_head list; char *name; char *path; - uuid_t uuid; struct cds_list_head ust_traces; struct ltt_kernel_session *kernel_session; unsigned int ust_trace_count; @@ -49,7 +47,6 @@ struct ltt_session { int create_session(char *name, char *path); int destroy_session(char *name); void get_lttng_session(struct lttng_session *sessions); -struct ltt_session *find_session_by_uuid(uuid_t session_id); struct ltt_session *find_session_by_name(char *name); unsigned int get_session_count(void); struct ltt_session_list *get_session_list(void); -- 2.34.1