From 9ba5f1730b48dd871319e19186b325d33cfb6aed Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 29 Apr 2011 11:20:46 -0400 Subject: [PATCH] ctf metadata visitor: remove word_size from trace declaration Signed-off-by: Mathieu Desnoyers --- .../metadata/ctf-visitor-generate-io-struct.c | 16 ---------------- include/babeltrace/ctf/metadata.h | 2 -- 2 files changed, 18 deletions(-) diff --git a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c index 7009d03e..f4776a0a 100644 --- a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c +++ b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c @@ -1682,17 +1682,6 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru return -EINVAL; } CTF_TRACE_SET_FIELD(trace, minor); - } else if (!strcmp(left, "word_size")) { - if (CTF_TRACE_FIELD_IS_SET(trace, word_size)) { - fprintf(fd, "[error] %s: word_size already declared in trace declaration\n", __func__); - return -EPERM; - } - ret = get_unary_unsigned(&node->u.ctf_expression.right, &trace->word_size); - if (ret) { - fprintf(fd, "[error] %s: unexpected unary expression for trace word_size\n", __func__); - return -EINVAL; - } - CTF_TRACE_SET_FIELD(trace, word_size); } else if (!strcmp(left, "uuid")) { if (CTF_TRACE_FIELD_IS_SET(trace, uuid)) { fprintf(fd, "[error] %s: uuid already declared in trace declaration\n", __func__); @@ -1746,11 +1735,6 @@ int ctf_trace_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_trace fprintf(fd, "[error] %s: missing uuid field in trace declaration\n", __func__); goto error; } - if (!CTF_TRACE_FIELD_IS_SET(trace, word_size)) { - ret = -EPERM; - fprintf(fd, "[error] %s: missing word_size field in trace declaration\n", __func__); - goto error; - } return 0; error: diff --git a/include/babeltrace/ctf/metadata.h b/include/babeltrace/ctf/metadata.h index bb6dc6cb..c774d7fb 100644 --- a/include/babeltrace/ctf/metadata.h +++ b/include/babeltrace/ctf/metadata.h @@ -53,14 +53,12 @@ struct ctf_trace { uint64_t major; uint64_t minor; uuid_t uuid; - uint64_t word_size; int byte_order; enum { /* Fields populated mask */ CTF_TRACE_major = (1U << 0), CTF_TRACE_minor = (1U << 1), CTF_TRACE_uuid = (1U << 2), - CTF_TRACE_word_size = (1U << 3), } field_mask; }; -- 2.34.1