Remove default port API
[babeltrace.git] / plugins / text / pretty / pretty.c
index 88fc521d60cd3562d054687721cfefaca6cc7b0a..cea5fe688f080511e9b5c63903f020864380f86c 100644 (file)
@@ -30,6 +30,7 @@
 #include <babeltrace/plugin/plugin-dev.h>
 #include <babeltrace/graph/component.h>
 #include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/private-component-sink.h>
 #include <babeltrace/graph/component-sink.h>
 #include <babeltrace/graph/port.h>
 #include <babeltrace/graph/private-port.h>
@@ -52,7 +53,7 @@
 static
 const char *plugin_options[] = {
        "color",
-       "output-path",
+       "path",
        "no-delta",
        "clock-cycles",
        "clock-seconds",
@@ -387,9 +388,7 @@ enum bt_component_status apply_params(struct pretty_component *pretty,
                bt_put(color_value);
        }
 
-       ret = apply_one_string("output-path",
-                       params,
-                       &pretty->options.output_path);
+       ret = apply_one_string("path", params, &pretty->options.output_path);
        if (ret != BT_COMPONENT_STATUS_OK) {
                goto end;
        }
@@ -707,12 +706,22 @@ enum bt_component_status pretty_init(
 {
        enum bt_component_status ret;
        struct pretty_component *pretty = create_pretty();
+       void *priv_port;
 
        if (!pretty) {
                ret = BT_COMPONENT_STATUS_NOMEM;
                goto end;
        }
 
+       priv_port = bt_private_component_sink_add_input_private_port(component,
+               "in", NULL);
+       if (!priv_port) {
+               ret = BT_COMPONENT_STATUS_NOMEM;
+               goto end;
+       }
+
+       bt_put(priv_port);
+
        pretty->out = stdout;
        pretty->err = stderr;
 
@@ -728,7 +737,6 @@ enum bt_component_status pretty_init(
        }
 
        set_use_colors(pretty);
-
        ret = bt_private_component_set_user_data(component, pretty);
        if (ret != BT_COMPONENT_STATUS_OK) {
                goto error;
This page took 0.024453 seconds and 4 git commands to generate.