struct ustctl_enum_entry {
struct ustctl_enum_value start, end; /* start and end are inclusive */
char string[LTTNG_UST_SYM_NAME_LEN];
- char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
+ union {
+ struct {
+ uint8_t is_auto;
+ } LTTNG_PACKED options;
+ char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
+ } u;
} LTTNG_PACKED;
#define USTCTL_UST_BASIC_TYPE_PADDING 296
goto end;
}
}
- ret = lttng_metadata_printf(session,
- "\" = ");
+ ret = lttng_metadata_printf(session, "\"");
if (ret) {
goto end;
}
- if (entry->start.signedness) {
- ret = lttng_metadata_printf(session,
- "%lld", (long long) entry->start.value);
+ if (entry->u.options.is_auto) {
+ ret = lttng_metadata_printf(session, ",\n");
+ if (ret) {
+ goto end;
+ }
} else {
ret = lttng_metadata_printf(session,
- "%llu", entry->start.value);
- }
- if (ret) {
- goto end;
- }
+ " = ");
+ if (ret) {
+ goto end;
+ }
- if (entry->start.signedness == entry->end.signedness &&
- entry->start.value == entry->end.value) {
- ret = lttng_metadata_printf(session,
- ",\n");
- } else {
- if (entry->end.signedness) {
+ if (entry->start.signedness) {
ret = lttng_metadata_printf(session,
- " ... %lld,\n", (long long) entry->end.value);
+ "%lld", (long long) entry->start.value);
} else {
ret = lttng_metadata_printf(session,
- " ... %llu,\n", entry->end.value);
+ "%llu", entry->start.value);
+ }
+ if (ret) {
+ goto end;
+ }
+
+ if (entry->start.signedness == entry->end.signedness &&
+ entry->start.value ==
+ entry->end.value) {
+ ret = lttng_metadata_printf(session, ",\n");
+ } else {
+ if (entry->end.signedness) {
+ ret = lttng_metadata_printf(session,
+ " ... %lld,\n",
+ (long long) entry->end.value);
+ } else {
+ ret = lttng_metadata_printf(session,
+ " ... %llu,\n",
+ entry->end.value);
+ }
+ }
+ if (ret) {
+ goto end;
}
- }
- if (ret) {
- goto end;
}
}
nesting--;