projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lib: expose bt_lib_log_level symbol
[babeltrace.git]
/
cli
/
babeltrace-cfg-cli-args-connect.c
diff --git
a/cli/babeltrace-cfg-cli-args-connect.c
b/cli/babeltrace-cfg-cli-args-connect.c
index c22fe6ad2e8bf1f75c5a0ccebe4178dff25870fe..ff3bf91701fb3c125f5d990688243c3c500ce88e 100644
(file)
--- a/
cli/babeltrace-cfg-cli-args-connect.c
+++ b/
cli/babeltrace-cfg-cli-args-connect.c
@@
-21,8
+21,7
@@
*/
#include <stdlib.h>
*/
#include <stdlib.h>
-#include <babeltrace/values.h>
-#include <babeltrace/private-values.h>
+#include <babeltrace/babeltrace.h>
#include <babeltrace/common-internal.h>
#include "babeltrace-cfg.h"
#include "babeltrace-cfg-cli-args-connect.h"
#include <babeltrace/common-internal.h>
#include "babeltrace-cfg.h"
#include "babeltrace-cfg-cli-args-connect.h"
@@
-296,7
+295,8
@@
static struct bt_config_component *find_component_in_array(GPtrArray *comps,
struct bt_config_component *comp = g_ptr_array_index(comps, i);
if (strcmp(name, comp->instance_name->str) == 0) {
struct bt_config_component *comp = g_ptr_array_index(comps, i);
if (strcmp(name, comp->instance_name->str) == 0) {
- found_comp = bt_object_get_ref(comp);
+ found_comp = comp;
+ bt_object_get_ref(found_comp);
goto end;
}
}
goto end;
}
}
@@
-507,7
+507,7
@@
end:
}
static int validate_all_components_connected_in_array(GPtrArray *comps,
}
static int validate_all_components_connected_in_array(GPtrArray *comps,
-
struc
t bt_value *connected_components,
+
cons
t bt_value *connected_components,
char *error_buf, size_t error_buf_size)
{
int ret = 0;
char *error_buf, size_t error_buf_size)
{
int ret = 0;
@@
-535,8
+535,7
@@
static int validate_all_components_connected(struct bt_config *cfg,
{
size_t i;
int ret = 0;
{
size_t i;
int ret = 0;
- struct bt_private_value *connected_components =
- bt_private_value_map_create();
+ bt_value *connected_components = bt_value_map_create();
if (!connected_components) {
ret = -1;
if (!connected_components) {
ret = -1;
@@
-547,13
+546,13
@@
static int validate_all_components_connected(struct bt_config *cfg,
struct bt_config_connection *connection =
g_ptr_array_index(cfg->cmd_data.run.connections, i);
struct bt_config_connection *connection =
g_ptr_array_index(cfg->cmd_data.run.connections, i);
- ret = bt_
private_
value_map_insert_entry(connected_components,
+ ret = bt_value_map_insert_entry(connected_components,
connection->upstream_comp_name->str, bt_value_null);
if (ret) {
goto end;
}
connection->upstream_comp_name->str, bt_value_null);
if (ret) {
goto end;
}
- ret = bt_
private_
value_map_insert_entry(connected_components,
+ ret = bt_value_map_insert_entry(connected_components,
connection->downstream_comp_name->str, bt_value_null);
if (ret) {
goto end;
connection->downstream_comp_name->str, bt_value_null);
if (ret) {
goto end;
@@
-562,7
+561,7
@@
static int validate_all_components_connected(struct bt_config *cfg,
ret = validate_all_components_connected_in_array(
cfg->cmd_data.run.sources,
ret = validate_all_components_connected_in_array(
cfg->cmd_data.run.sources,
-
bt_private_value_as_value(connected_components)
,
+
connected_components
,
error_buf, error_buf_size);
if (ret) {
goto end;
error_buf, error_buf_size);
if (ret) {
goto end;
@@
-570,7
+569,7
@@
static int validate_all_components_connected(struct bt_config *cfg,
ret = validate_all_components_connected_in_array(
cfg->cmd_data.run.filters,
ret = validate_all_components_connected_in_array(
cfg->cmd_data.run.filters,
-
bt_private_value_as_value(connected_components)
,
+
connected_components
,
error_buf, error_buf_size);
if (ret) {
goto end;
error_buf, error_buf_size);
if (ret) {
goto end;
@@
-578,14
+577,14
@@
static int validate_all_components_connected(struct bt_config *cfg,
ret = validate_all_components_connected_in_array(
cfg->cmd_data.run.sinks,
ret = validate_all_components_connected_in_array(
cfg->cmd_data.run.sinks,
-
bt_private_value_as_value(connected_components)
,
+
connected_components
,
error_buf, error_buf_size);
if (ret) {
goto end;
}
end:
error_buf, error_buf_size);
if (ret) {
goto end;
}
end:
- bt_
object
_put_ref(connected_components);
+ bt_
value
_put_ref(connected_components);
return ret;
}
return ret;
}
@@
-594,8
+593,8
@@
static int validate_no_duplicate_connection(struct bt_config *cfg,
{
size_t i;
int ret = 0;
{
size_t i;
int ret = 0;
-
struct bt_private
_value *flat_connection_names =
- bt_
private_
value_map_create();
+
bt
_value *flat_connection_names =
+ bt_value_map_create();
GString *flat_connection_name = NULL;
if (!flat_connection_names) {
GString *flat_connection_name = NULL;
if (!flat_connection_names) {
@@
-619,9
+618,8
@@
static int validate_no_duplicate_connection(struct bt_config *cfg,
connection->downstream_comp_name->str,
connection->downstream_port_glob->str);
connection->downstream_comp_name->str,
connection->downstream_port_glob->str);
- if (bt_value_map_has_entry(bt_private_value_as_value(
- flat_connection_names),
- flat_connection_name->str)) {
+ if (bt_value_map_has_entry(flat_connection_names,
+ flat_connection_name->str)) {
snprintf(error_buf, error_buf_size,
"Duplicate connection:\n %s\n",
connection->arg->str);
snprintf(error_buf, error_buf_size,
"Duplicate connection:\n %s\n",
connection->arg->str);
@@
-629,7
+627,7
@@
static int validate_no_duplicate_connection(struct bt_config *cfg,
goto end;
}
goto end;
}
- ret = bt_
private_
value_map_insert_entry(flat_connection_names,
+ ret = bt_value_map_insert_entry(flat_connection_names,
flat_connection_name->str, bt_value_null);
if (ret) {
goto end;
flat_connection_name->str, bt_value_null);
if (ret) {
goto end;
@@
-637,7
+635,7
@@
static int validate_no_duplicate_connection(struct bt_config *cfg,
}
end:
}
end:
- bt_
object
_put_ref(flat_connection_names);
+ bt_
value
_put_ref(flat_connection_names);
if (flat_connection_name) {
g_string_free(flat_connection_name, TRUE);
if (flat_connection_name) {
g_string_free(flat_connection_name, TRUE);
@@
-681,7
+679,7
@@
end:
}
int bt_config_cli_args_create_connections(struct bt_config *cfg,
}
int bt_config_cli_args_create_connections(struct bt_config *cfg,
-
struc
t bt_value *connection_args,
+
cons
t bt_value *connection_args,
char *error_buf, size_t error_buf_size)
{
int ret;
char *error_buf, size_t error_buf_size)
{
int ret;
@@
-694,8
+692,8
@@
int bt_config_cli_args_create_connections(struct bt_config *cfg,
}
for (i = 0; i < bt_value_array_get_size(connection_args); i++) {
}
for (i = 0; i < bt_value_array_get_size(connection_args); i++) {
-
struc
t bt_value *arg_value =
- bt_value_array_borrow_element_by_index(
+
cons
t bt_value *arg_value =
+ bt_value_array_borrow_element_by_index
_const
(
connection_args, i);
const char *arg;
struct bt_config_connection *cfg_connection;
connection_args, i);
const char *arg;
struct bt_config_connection *cfg_connection;
This page took
0.027694 seconds
and
4
git commands to generate.