0e84e8fa49007b706e1214195cb1507e14a34eb1
[babeltrace.git] / include / babeltrace / common-internal.h
1 #ifndef BABELTRACE_COMMON_INTERNAL_H
2 #define BABELTRACE_COMMON_INTERNAL_H
3
4 /*
5 * Copyright (c) 2018 EfficiOS Inc. and Linux Foundation
6 * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 */
26
27 #include <stdbool.h>
28 #include <babeltrace/assert-internal.h>
29 #include <babeltrace/babeltrace-internal.h>
30 #include <babeltrace/trace-ir/field-class-const.h>
31 #include <babeltrace/trace-ir/field-path-const.h>
32 #include <babeltrace/trace-ir/event-class-const.h>
33 #include <babeltrace/graph/self-message-iterator.h>
34 #include <babeltrace/value.h>
35 #include <stdarg.h>
36 #include <inttypes.h>
37 #include <stdint.h>
38 #include <glib.h>
39
40 #define BT_COMMON_COLOR_RESET "\033[0m"
41 #define BT_COMMON_COLOR_BOLD "\033[1m"
42 #define BT_COMMON_COLOR_FG_DEFAULT "\033[39m"
43 #define BT_COMMON_COLOR_FG_RED "\033[31m"
44 #define BT_COMMON_COLOR_FG_GREEN "\033[32m"
45 #define BT_COMMON_COLOR_FG_YELLOW "\033[33m"
46 #define BT_COMMON_COLOR_FG_BLUE "\033[34m"
47 #define BT_COMMON_COLOR_FG_MAGENTA "\033[35m"
48 #define BT_COMMON_COLOR_FG_CYAN "\033[36m"
49 #define BT_COMMON_COLOR_FG_LIGHT_GRAY "\033[37m"
50 #define BT_COMMON_COLOR_BG_DEFAULT "\033[49m"
51 #define BT_COMMON_COLOR_BG_RED "\033[41m"
52 #define BT_COMMON_COLOR_BG_GREEN "\033[42m"
53 #define BT_COMMON_COLOR_BG_YELLOW "\033[43m"
54 #define BT_COMMON_COLOR_BG_BLUE "\033[44m"
55 #define BT_COMMON_COLOR_BG_MAGENTA "\033[45m"
56 #define BT_COMMON_COLOR_BG_CYAN "\033[46m"
57 #define BT_COMMON_COLOR_BG_LIGHT_GRAY "\033[47m"
58
59 struct bt_common_lttng_live_url_parts {
60 GString *proto;
61 GString *hostname;
62 GString *target_hostname;
63 GString *session_name;
64
65 /* -1 means default port */
66 int port;
67 };
68
69 /*
70 * Checks if the current process has setuid or setgid access rights.
71 * Returns `true` if so.
72 */
73 BT_HIDDEN
74 bool bt_common_is_setuid_setgid(void);
75
76 /*
77 * Returns the system-wide plugin path, e.g.
78 * `/usr/lib/babeltrace/plugins`. Do not free the return value.
79 */
80 BT_HIDDEN
81 const char *bt_common_get_system_plugin_path(void);
82
83 /*
84 * Returns the user plugin path, e.g.
85 * `/home/user/.local/lib/babeltrace/plugins`. You need to free the
86 * return value.
87 */
88 BT_HIDDEN
89 char *bt_common_get_home_plugin_path(void);
90
91 /*
92 * Appends the list of directories in `paths` to the array `dirs`.
93 * `paths` is a list of directories separated by `:`. Returns 0 on
94 * success.
95 */
96 BT_HIDDEN
97 int bt_common_append_plugin_path_dirs(const char *paths, GPtrArray *dirs);
98
99 /*
100 * Returns `true` if terminal color codes are supported for this
101 * process.
102 */
103 BT_HIDDEN
104 bool bt_common_colors_supported(void);
105
106 BT_HIDDEN
107 const char *bt_common_color_reset(void);
108
109 BT_HIDDEN
110 const char *bt_common_color_bold(void);
111
112 BT_HIDDEN
113 const char *bt_common_color_fg_default(void);
114
115 BT_HIDDEN
116 const char *bt_common_color_fg_red(void);
117
118 BT_HIDDEN
119 const char *bt_common_color_fg_green(void);
120
121 BT_HIDDEN
122 const char *bt_common_color_fg_yellow(void);
123
124 BT_HIDDEN
125 const char *bt_common_color_fg_blue(void);
126
127 BT_HIDDEN
128 const char *bt_common_color_fg_magenta(void);
129
130 BT_HIDDEN
131 const char *bt_common_color_fg_cyan(void);
132
133 BT_HIDDEN
134 const char *bt_common_color_fg_light_gray(void);
135
136 BT_HIDDEN
137 const char *bt_common_color_bg_default(void);
138
139 BT_HIDDEN
140 const char *bt_common_color_bg_red(void);
141
142 BT_HIDDEN
143 const char *bt_common_color_bg_green(void);
144
145 BT_HIDDEN
146 const char *bt_common_color_bg_yellow(void);
147
148 BT_HIDDEN
149 const char *bt_common_color_bg_blue(void);
150
151 BT_HIDDEN
152 const char *bt_common_color_bg_magenta(void);
153
154 BT_HIDDEN
155 const char *bt_common_color_bg_cyan(void);
156
157 BT_HIDDEN
158 const char *bt_common_color_bg_light_gray(void);
159
160 /*
161 * Returns the substring from `input` to the first character found
162 * in the list of characters `end_chars`, unescaping any character
163 * found in `escapable_chars`, and sets `*end_pos` to the position of
164 * the end (from `input`). The caller owns the returned GString.
165 */
166 BT_HIDDEN
167 GString *bt_common_string_until(const char *input, const char *escapable_chars,
168 const char *end_chars, size_t *end_pos);
169
170 /*
171 * Returns the quoted version of `input` for a shell. If
172 * `with_single_quotes` is `true`, prepends and appends the `'` prefix
173 * and suffix to the returned string; otherwise the caller should
174 * prepend and append them manually, although they are not always
175 * required. The caller owns the returned GString.
176 */
177 BT_HIDDEN
178 GString *bt_common_shell_quote(const char *input, bool with_single_quotes);
179
180 /*
181 * Returns `true` if `input` is a string made only of printable
182 * characters.
183 */
184 BT_HIDDEN
185 bool bt_common_string_is_printable(const char *input);
186
187 /*
188 * Destroys the parts of an LTTng live URL as returned by
189 * bt_common_parse_lttng_live_url().
190 */
191 BT_HIDDEN
192 void bt_common_destroy_lttng_live_url_parts(
193 struct bt_common_lttng_live_url_parts *parts);
194
195 /*
196 * Parses the LTTng live URL `url` and returns its different parts.
197 * If there's an error, writes the error message into `*error_buf`
198 * up to `error_buf_size` bytes. You must destroy the returned value
199 * with bt_common_destroy_lttng_live_url_parts().
200 */
201 BT_HIDDEN
202 struct bt_common_lttng_live_url_parts bt_common_parse_lttng_live_url(
203 const char *url, char *error_buf, size_t error_buf_size);
204
205 /*
206 * Normalizes (in place) a star globbing pattern to be used with
207 * bt_common_star_glob_match(). This function always succeeds.
208 */
209 BT_HIDDEN
210 void bt_common_normalize_star_glob_pattern(char *pattern);
211
212 /*
213 * Returns `true` if `candidate` (of size `candidate_len`) matches
214 * the star globbing pattern `pattern` (of size `pattern_len`).
215 */
216 BT_HIDDEN
217 bool bt_common_star_glob_match(const char *pattern, size_t pattern_len,
218 const char *candidate, size_t candidate_len);
219
220 /*
221 * Normalizes the path `path`:
222 *
223 * * If it's a relative path, converts it to an absolute path using
224 * `wd` as the working directory (or the current working directory
225 * if `wd` is NULL).
226 * * Removes consecutive and trailing slashes.
227 * * Resolves `..` and `.` in the path (both in `path` and in `wd`).
228 * * Does NOT resolve symbolic links.
229 *
230 * The caller owns the returned GString.
231 */
232 BT_HIDDEN
233 GString *bt_common_normalize_path(const char *path, const char *wd);
234
235 typedef void (* bt_common_handle_custom_specifier_func)(void *priv_data,
236 char **buf, size_t avail_size, const char **fmt, va_list *args);
237
238 /*
239 * This is a custom vsnprintf() which handles the standard conversion
240 * specifier as well as custom ones.
241 *
242 * `fmt` is a typical printf()-style format string, with the following
243 * limitations:
244 *
245 * * The `*` width specifier is not accepted.
246 * * The `*` precision specifier is not accepted.
247 * * The `j` and `t` length modifiers are not accepted.
248 * * The `n` format specifier is not accepted.
249 * * The format specifiers defined in <inttypes.h> are not accepted
250 * except for `PRId64`, `PRIu64`, `PRIx64`, `PRIX64`, `PRIo64`, and
251 * `PRIi64`.
252 *
253 * `intro` specifies which special character immediately following an
254 * introductory `%` character in `fmt` is used to indicate a custom
255 * conversion specifier. For example, if `intro` is '@', then any `%@`
256 * sequence in `fmt` is the beginning of a custom conversion specifier.
257 *
258 * When a custom conversion specifier is encountered in `fmt`,
259 * the function calls `handle_specifier`. This callback receives:
260 *
261 * `priv_data`:
262 * Custom, private data.
263 *
264 * `buf`:
265 * Address of the current buffer pointer. `*buf` is the position to
266 * append new data. The callback must update `*buf` when appending
267 * new data. The callback must ensure not to write passed the whole
268 * buffer passed to bt_common_custom_vsnprintf().
269 *
270 * `avail_size`:
271 * Number of bytes left in whole buffer from the `*buf` point.
272 *
273 * `fmt`:
274 * Address of the current format string pointer. `*fmt` points to
275 * the introductory `%` character, which is followed by the
276 * character `intro`. The callback must update `*fmt` so that it
277 * points after the whole custom conversion specifier.
278 *
279 * `args`:
280 * Variable argument list. Use va_arg() to get new arguments from
281 * this list and update it at the same time.
282 *
283 * Because this is an internal utility, this function and its callback
284 * do not return error codes: they abort when there's any error (bad
285 * format string, for example).
286 */
287 BT_HIDDEN
288 void bt_common_custom_vsnprintf(char *buf, size_t buf_size,
289 char intro,
290 bt_common_handle_custom_specifier_func handle_specifier,
291 void *priv_data, const char *fmt, va_list *args);
292
293 /*
294 * Variadic form of bt_common_custom_vsnprintf().
295 */
296 BT_HIDDEN
297 void bt_common_custom_snprintf(char *buf, size_t buf_size,
298 char intro,
299 bt_common_handle_custom_specifier_func handle_specifier,
300 void *priv_data, const char *fmt, ...);
301
302 /*
303 * Returns the system page size.
304 */
305 BT_HIDDEN
306 size_t bt_common_get_page_size(void);
307
308 static inline
309 const char *bt_common_field_class_type_string(enum bt_field_class_type class_type)
310 {
311 switch (class_type) {
312 case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
313 return "BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER";
314 case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER:
315 return "BT_FIELD_CLASS_TYPE_SIGNED_INTEGER";
316 case BT_FIELD_CLASS_TYPE_REAL:
317 return "BT_FIELD_CLASS_TYPE_REAL";
318 case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION:
319 return "BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION";
320 case BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION:
321 return "BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION";
322 case BT_FIELD_CLASS_TYPE_STRING:
323 return "BT_FIELD_CLASS_TYPE_STRING";
324 case BT_FIELD_CLASS_TYPE_STRUCTURE:
325 return "BT_FIELD_CLASS_TYPE_STRUCTURE";
326 case BT_FIELD_CLASS_TYPE_STATIC_ARRAY:
327 return "BT_FIELD_CLASS_TYPE_STATIC_ARRAY";
328 case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY:
329 return "BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY";
330 case BT_FIELD_CLASS_TYPE_VARIANT:
331 return "BT_FIELD_CLASS_TYPE_VARIANT";
332 default:
333 return "(unknown)";
334 }
335 };
336
337 static inline
338 const char *bt_common_field_class_integer_preferred_display_base_string(enum bt_field_class_integer_preferred_display_base base)
339 {
340 switch (base) {
341 case BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY:
342 return "BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY";
343 case BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL:
344 return "BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL";
345 case BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL:
346 return "BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL";
347 case BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL:
348 return "BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL";
349 default:
350 return "(unknown)";
351 }
352 }
353
354 static inline
355 const char *bt_common_scope_string(enum bt_scope scope)
356 {
357 switch (scope) {
358 case BT_SCOPE_PACKET_CONTEXT:
359 return "BT_SCOPE_PACKET_CONTEXT";
360 case BT_SCOPE_EVENT_COMMON_CONTEXT:
361 return "BT_SCOPE_EVENT_COMMON_CONTEXT";
362 case BT_SCOPE_EVENT_SPECIFIC_CONTEXT:
363 return "BT_SCOPE_EVENT_SPECIFIC_CONTEXT";
364 case BT_SCOPE_EVENT_PAYLOAD:
365 return "BT_SCOPE_EVENT_PAYLOAD";
366 default:
367 return "(unknown)";
368 }
369 }
370
371 static inline
372 const char *bt_common_event_class_log_level_string(
373 enum bt_event_class_log_level level)
374 {
375 switch (level) {
376 case BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY:
377 return "BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY";
378 case BT_EVENT_CLASS_LOG_LEVEL_ALERT:
379 return "BT_EVENT_CLASS_LOG_LEVEL_ALERT";
380 case BT_EVENT_CLASS_LOG_LEVEL_CRITICAL:
381 return "BT_EVENT_CLASS_LOG_LEVEL_CRITICAL";
382 case BT_EVENT_CLASS_LOG_LEVEL_ERROR:
383 return "BT_EVENT_CLASS_LOG_LEVEL_ERROR";
384 case BT_EVENT_CLASS_LOG_LEVEL_WARNING:
385 return "BT_EVENT_CLASS_LOG_LEVEL_WARNING";
386 case BT_EVENT_CLASS_LOG_LEVEL_NOTICE:
387 return "BT_EVENT_CLASS_LOG_LEVEL_NOTICE";
388 case BT_EVENT_CLASS_LOG_LEVEL_INFO:
389 return "BT_EVENT_CLASS_LOG_LEVEL_INFO";
390 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM:
391 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM";
392 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM:
393 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM";
394 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS:
395 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS";
396 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE:
397 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE";
398 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT:
399 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT";
400 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION:
401 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION";
402 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE:
403 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE";
404 case BT_EVENT_CLASS_LOG_LEVEL_DEBUG:
405 return "BT_EVENT_CLASS_LOG_LEVEL_DEBUG";
406 default:
407 return "(unknown)";
408 }
409 };
410
411 static inline
412 const char *bt_common_value_type_string(enum bt_value_type type)
413 {
414 switch (type) {
415 case BT_VALUE_TYPE_NULL:
416 return "BT_VALUE_TYPE_NULL";
417 case BT_VALUE_TYPE_BOOL:
418 return "BT_VALUE_TYPE_BOOL";
419 case BT_VALUE_TYPE_INTEGER:
420 return "BT_VALUE_TYPE_INTEGER";
421 case BT_VALUE_TYPE_REAL:
422 return "BT_VALUE_TYPE_REAL";
423 case BT_VALUE_TYPE_STRING:
424 return "BT_VALUE_TYPE_STRING";
425 case BT_VALUE_TYPE_ARRAY:
426 return "BT_VALUE_TYPE_ARRAY";
427 case BT_VALUE_TYPE_MAP:
428 return "BT_VALUE_TYPE_MAP";
429 default:
430 return "(unknown)";
431 }
432 };
433
434 static inline
435 GString *bt_common_field_path_string(struct bt_field_path *path)
436 {
437 GString *str = g_string_new(NULL);
438 uint64_t i;
439
440 BT_ASSERT(path);
441
442 if (!str) {
443 goto end;
444 }
445
446 g_string_append_printf(str, "[%s", bt_common_scope_string(
447 bt_field_path_get_root_scope(path)));
448
449 for (i = 0; i < bt_field_path_get_item_count(path); i++) {
450 const struct bt_field_path_item *fp_item =
451 bt_field_path_borrow_item_by_index_const(path, i);
452
453 switch (bt_field_path_item_get_type(fp_item)) {
454 case BT_FIELD_PATH_ITEM_TYPE_INDEX:
455 g_string_append_printf(str, ", %" PRIu64,
456 bt_field_path_item_index_get_index(fp_item));
457 break;
458 case BT_FIELD_PATH_ITEM_TYPE_CURRENT_ARRAY_ELEMENT:
459 g_string_append(str, ", <CUR>");
460 break;
461 default:
462 abort();
463 }
464 }
465
466 g_string_append(str, "]");
467
468 end:
469 return str;
470 }
471
472 static inline
473 const char *bt_common_self_message_iterator_status_string(
474 enum bt_self_message_iterator_status status)
475 {
476 switch (status) {
477 case BT_SELF_MESSAGE_ITERATOR_STATUS_AGAIN:
478 return "BT_SELF_MESSAGE_ITERATOR_STATUS_AGAIN";
479 case BT_SELF_MESSAGE_ITERATOR_STATUS_END:
480 return "BT_SELF_MESSAGE_ITERATOR_STATUS_END";
481 case BT_SELF_MESSAGE_ITERATOR_STATUS_OK:
482 return "BT_SELF_MESSAGE_ITERATOR_STATUS_OK";
483 case BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR:
484 return "BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR";
485 case BT_SELF_MESSAGE_ITERATOR_STATUS_NOMEM:
486 return "BT_SELF_MESSAGE_ITERATOR_STATUS_NOMEM";
487 default:
488 return "(unknown)";
489 }
490 };
491
492 #define NS_PER_S_I INT64_C(1000000000)
493 #define NS_PER_S_U UINT64_C(1000000000)
494
495 static inline
496 int bt_common_clock_value_from_ns_from_origin(
497 int64_t cc_offset_seconds, uint64_t cc_offset_cycles,
498 uint64_t cc_freq, int64_t ns_from_origin,
499 uint64_t *raw_value)
500 {
501 int ret = 0;
502 int64_t offset_in_ns;
503 uint64_t value_in_ns;
504 uint64_t rem_value_in_ns;
505 uint64_t value_periods;
506 uint64_t value_period_cycles;
507 int64_t ns_to_add;
508
509 BT_ASSERT(raw_value);
510
511 /* Compute offset part of requested value, in nanoseconds */
512 if (!bt_safe_to_mul_int64(cc_offset_seconds, NS_PER_S_I)) {
513 ret = -1;
514 goto end;
515 }
516
517 offset_in_ns = cc_offset_seconds * NS_PER_S_I;
518
519 if (cc_freq == NS_PER_S_U) {
520 ns_to_add = (int64_t) cc_offset_cycles;
521 } else {
522 if (!bt_safe_to_mul_int64((int64_t) cc_offset_cycles,
523 NS_PER_S_I)) {
524 ret = -1;
525 goto end;
526 }
527
528 ns_to_add = ((int64_t) cc_offset_cycles * NS_PER_S_I) /
529 (int64_t) cc_freq;
530 }
531
532 if (!bt_safe_to_add_int64(offset_in_ns, ns_to_add)) {
533 ret = -1;
534 goto end;
535 }
536
537 offset_in_ns += ns_to_add;
538
539 /* Value part in nanoseconds */
540 if (ns_from_origin < offset_in_ns) {
541 ret = -1;
542 goto end;
543 }
544
545 value_in_ns = (uint64_t) (ns_from_origin - offset_in_ns);
546
547 /* Number of whole clock periods in `value_in_ns` */
548 value_periods = value_in_ns / NS_PER_S_U;
549
550 /* Remaining nanoseconds in cycles + whole clock periods in cycles */
551 rem_value_in_ns = value_in_ns - value_periods * NS_PER_S_U;
552
553 if (value_periods > UINT64_MAX / cc_freq) {
554 ret = -1;
555 goto end;
556 }
557
558 if (!bt_safe_to_mul_uint64(value_periods, cc_freq)) {
559 ret = -1;
560 goto end;
561 }
562
563 value_period_cycles = value_periods * cc_freq;
564
565 if (!bt_safe_to_mul_uint64(cc_freq, rem_value_in_ns)) {
566 ret = -1;
567 goto end;
568 }
569
570 if (!bt_safe_to_add_uint64(cc_freq * rem_value_in_ns / NS_PER_S_U,
571 value_period_cycles)) {
572 ret = -1;
573 goto end;
574 }
575
576 *raw_value = cc_freq * rem_value_in_ns / NS_PER_S_U +
577 value_period_cycles;
578
579 end:
580 return ret;
581 }
582
583 static inline
584 enum bt_self_message_iterator_status bt_common_message_iterator_status_to_self(
585 enum bt_message_iterator_status status)
586 {
587 return (int) status;
588 }
589 #endif /* BABELTRACE_COMMON_INTERNAL_H */
This page took 0.040913 seconds and 4 git commands to generate.