From d8fbe2a9cc6ace367bfb5428df3e7649ac012f32 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 17 Sep 2012 12:25:41 -0400 Subject: [PATCH] Add the written value when listing fields Signed-off-by: David Goulet --- include/lttng/lttng.h | 1 + src/bin/lttng-sessiond/ust-app.c | 1 + src/bin/lttng/commands/list.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index a9aee7233..d06672852 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -261,6 +261,7 @@ struct lttng_event_field { enum lttng_event_field_type type; char padding[LTTNG_EVENT_FIELD_PADDING]; struct lttng_event event; + int written; }; /* diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index af0a51b88..81b1f418a 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1667,6 +1667,7 @@ int ust_app_list_event_fields(struct lttng_event_field **fields) memcpy(tmp[count].field_name, uiter.field_name, LTTNG_UST_SYM_NAME_LEN); tmp[count].type = uiter.type; + tmp[count].written = uiter.written; memcpy(tmp[count].event.name, uiter.event_name, LTTNG_UST_SYM_NAME_LEN); tmp[count].event.loglevel = uiter.loglevel; diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index afd7cf0b3..eced2b716 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -280,8 +280,8 @@ static void print_event_field(struct lttng_event_field *field) if (!field->field_name[0]) { return; } - MSG("%sfield: %s (%s)", indent8, field->field_name, - field_type(field)); + MSG("%sfield: %s (%s)%s", indent8, field->field_name, + field_type(field), field->written ? "" : " [no write]"); } /* -- 2.34.1