projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ctf_enum_auto() for autoincrementing enumeration values
[lttng-ust.git]
/
liblttng-ust-comm
/
lttng-ust-comm.c
diff --git
a/liblttng-ust-comm/lttng-ust-comm.c
b/liblttng-ust-comm/lttng-ust-comm.c
index 2c54a443566a7fca4bc7e919d5bec6608f1fd176..129ad8f259aaa3eea7fea766a567c207fd98797e 100644
(file)
--- a/
liblttng-ust-comm/lttng-ust-comm.c
+++ b/
liblttng-ust-comm/lttng-ust-comm.c
@@
-766,7
+766,7
@@
ssize_t count_ctx_fields_recursive(size_t nr_fields,
}
static
}
static
-int serialize_string_encoding(
enum ustctl_string_encodings
*ue,
+int serialize_string_encoding(
int32_t
*ue,
enum lttng_string_encodings le)
{
switch (le) {
enum lttng_string_encodings le)
{
switch (le) {
@@
-1088,10
+1088,17
@@
int serialize_entries(struct ustctl_enum_entry **_entries,
uentry = &entries[i];
lentry = <tng_entries[i];
uentry = &entries[i];
lentry = <tng_entries[i];
- uentry->start = lentry->start;
- uentry->end = lentry->end;
+ uentry->start.value = lentry->start.value;
+ uentry->start.signedness = lentry->start.signedness;
+ uentry->end.value = lentry->end.value;
+ uentry->end.signedness = lentry->end.signedness;
strncpy(uentry->string, lentry->string, LTTNG_UST_SYM_NAME_LEN);
uentry->string[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
strncpy(uentry->string, lentry->string, LTTNG_UST_SYM_NAME_LEN);
uentry->string[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+
+ if (lentry->u.extra.options & LTTNG_ENUM_ENTRY_OPTION_IS_AUTO) {
+ uentry->u.extra.options |=
+ USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO;
+ }
}
*_entries = entries;
return 0;
}
*_entries = entries;
return 0;
This page took
0.02531 seconds
and
4
git commands to generate.