From f78f3df1b255162d62a68f31aba34b86528a029f Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 22 Apr 2021 12:18:57 -0400 Subject: [PATCH] Move dynamic-type to libcommon It is used by both liblttng-ust and liblttng-ust-ctl and contains no shared state. Change-Id: I51fc7a616d5e426a9286d873da29ffa661859f46 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- src/common/Makefile.am | 3 ++- .../lttng-ust-dynamic-type.c => common/dynamic-type.c} | 2 +- src/lib/lttng-ust/Makefile.am | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) rename src/{lib/lttng-ust/lttng-ust-dynamic-type.c => common/dynamic-type.c} (98%) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index ce427655..b5f8473b 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -12,7 +12,6 @@ noinst_HEADERS = \ bitmap.h \ clock.h \ creds.h \ - dynamic-type.h \ err-ptr.h \ events.h \ hash.h \ @@ -137,6 +136,8 @@ libsnprintf_la_SOURCES = \ # Common library libcommon_la_SOURCES = \ + dynamic-type.c \ + dynamic-type.h \ elf.c \ elf.h \ events.c \ diff --git a/src/lib/lttng-ust/lttng-ust-dynamic-type.c b/src/common/dynamic-type.c similarity index 98% rename from src/lib/lttng-ust/lttng-ust-dynamic-type.c rename to src/common/dynamic-type.c index 2b3ebd65..9350265c 100644 --- a/src/lib/lttng-ust/lttng-ust-dynamic-type.c +++ b/src/common/dynamic-type.c @@ -52,7 +52,7 @@ static struct lttng_ust_enum_desc dt_enum_desc = { .nr_entries = LTTNG_ARRAY_SIZE(dt_enum), }; -const struct lttng_ust_event_field *dt_var_fields[_NR_LTTNG_UST_DYNAMIC_TYPES] = { +static const struct lttng_ust_event_field *dt_var_fields[_NR_LTTNG_UST_DYNAMIC_TYPES] = { [LTTNG_UST_DYNAMIC_TYPE_NONE] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "none", diff --git a/src/lib/lttng-ust/Makefile.am b/src/lib/lttng-ust/Makefile.am index 2b22471a..3ef20aa6 100644 --- a/src/lib/lttng-ust/Makefile.am +++ b/src/lib/lttng-ust/Makefile.am @@ -74,7 +74,6 @@ liblttng_ust_support_la_SOURCES = \ lttng-tracer.h \ lttng-tracer-core.h \ ust-core.c \ - lttng-ust-dynamic-type.c \ lttng-rb-clients.h \ lttng-ring-buffer-client-template.h \ lttng-ring-buffer-client-discard.c \ -- 2.34.1