"--component",
"dmesg:src.text.dmesg",
"--params",
- "read-from-stdin=yes",
- "--params",
NULL, /* no-extract-timestamp=? placeholder */
"--component",
"ctf:sink.ctf.fs",
}
if (no_extract_ts) {
- bt_argv[7] = "no-extract-timestamp=yes";
+ bt_argv[5] = "no-extract-timestamp=yes";
} else {
- bt_argv[7] = "no-extract-timestamp=no";
+ bt_argv[5] = "no-extract-timestamp=no";
}
- bt_argv[13] = output_path;
+ bt_argv[11] = output_path;
(void) g_spawn_sync(NULL, bt_argv, NULL,
G_SPAWN_CHILD_INHERITS_STDIN, NULL, NULL,
NULL, NULL, &retcode, &error);
const char *path_str;
int ret = 0;
- read_from_stdin = bt_value_map_get(params, "read-from-stdin");
- if (read_from_stdin) {
- if (!bt_value_is_bool(read_from_stdin)) {
- BT_LOGE("Expecting a boolean value for the `read-from-stdin` parameter: "
- "type=%s",
- bt_value_type_string(
- bt_value_get_type(read_from_stdin)));
- goto error;
- }
-
- ret = bt_value_bool_get(read_from_stdin,
- &dmesg_comp->params.read_from_stdin);
- assert(ret == 0);
- }
-
no_timestamp = bt_value_map_get(params, "no-extract-timestamp");
if (no_timestamp) {
if (!bt_value_is_bool(no_timestamp)) {
assert(ret == 0);
g_string_assign(dmesg_comp->params.path, path_str);
} else {
- if (!dmesg_comp->params.read_from_stdin) {
- BT_LOGE_STR("Expecting `path` parameter or true `read-from-stdin` parameter.");
- goto error;
- }
+ dmesg_comp->params.read_from_stdin = true;
}
goto end;