text.pretty: remove unused debug info options
[babeltrace.git] / plugins / text / pretty / pretty.c
index 48a7147262a927d36c808d3b6e8dcd106b351bdc..87efe05aa1cb441801b29867389023fe6d237897 100644 (file)
@@ -53,9 +53,6 @@ static
 const char *plugin_options[] = {
        "color",
        "output-path",
-       "debug-info-dir",
-       "debug-info-target-prefix",
-       "debug-info-full-path",
        "no-delta",
        "clock-cycles",
        "clock-seconds",
@@ -92,8 +89,6 @@ void destroy_pretty_data(struct pretty_component *pretty)
                }
        }
        g_free(pretty->options.output_path);
-       g_free(pretty->options.debug_info_dir);
-       g_free(pretty->options.debug_info_target_prefix);
        g_free(pretty);
 }
 
@@ -144,15 +139,7 @@ enum bt_component_status handle_notification(struct pretty_component *pretty,
                break;
        case BT_NOTIFICATION_TYPE_EVENT:
        {
-               struct bt_ctf_event *event = bt_notification_event_get_event(
-                               notification);
-
-               if (!event) {
-                       ret = BT_COMPONENT_STATUS_ERROR;
-                       goto end;
-               }
-               ret = pretty_print_event(pretty, event);
-               bt_put(event);
+               ret = pretty_print_event(pretty, notification);
                if (ret != BT_COMPONENT_STATUS_OK) {
                        goto end;
                }
@@ -168,12 +155,11 @@ end:
 }
 
 BT_HIDDEN
-enum bt_component_status pretty_accept_port_connection(
+void pretty_port_connected(
                struct bt_private_component *component,
                struct bt_private_port *self_port,
                struct bt_port *other_port)
 {
-       enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
        struct bt_private_connection *connection;
        struct pretty_component *pretty;
 
@@ -186,11 +172,10 @@ enum bt_component_status pretty_accept_port_connection(
                bt_private_connection_create_notification_iterator(connection);
 
        if (!pretty->input_iterator) {
-               ret = BT_COMPONENT_STATUS_ERROR;
+               pretty->error = true;
        }
 
        bt_put(connection);
-       return ret;
 }
 
 BT_HIDDEN
@@ -203,9 +188,14 @@ enum bt_component_status pretty_consume(struct bt_private_component *component)
                bt_private_component_get_user_data(component);
        enum bt_notification_iterator_status it_ret;
 
-       it = pretty->input_iterator;
+       if (unlikely(pretty->error)) {
+               ret = BT_COMPONENT_STATUS_ERROR;
+               goto end;
+       }
 
+       it = pretty->input_iterator;
        it_ret = bt_notification_iterator_next(it);
+
        switch (it_ret) {
        case BT_NOTIFICATION_ITERATOR_STATUS_ERROR:
                ret = BT_COMPONENT_STATUS_ERROR;
@@ -221,7 +211,6 @@ enum bt_component_status pretty_consume(struct bt_private_component *component)
        notification = bt_notification_iterator_get_notification(it);
        assert(notification);
        ret = handle_notification(pretty, notification);
-       pretty->processed_first_event = true;
 end:
        bt_put(notification);
        return ret;
@@ -420,27 +409,6 @@ enum bt_component_status apply_params(struct pretty_component *pretty,
                goto end;
        }
 
-       ret = apply_one_string("debug-info-dir",
-                       params,
-                       &pretty->options.debug_info_dir);
-       if (ret != BT_COMPONENT_STATUS_OK) {
-               goto end;
-       }
-
-       ret = apply_one_string("debug-info-target-prefix",
-                       params,
-                       &pretty->options.debug_info_target_prefix);
-       if (ret != BT_COMPONENT_STATUS_OK) {
-               goto end;
-       }
-
-       value = false;          /* Default. */
-       ret = apply_one_bool("debug-info-full-path", params, &value, NULL);
-       if (ret != BT_COMPONENT_STATUS_OK) {
-               goto end;
-       }
-       pretty->options.debug_info_full_path = value;
-
        value = false;          /* Default. */
        ret = apply_one_bool("no-delta", params, &value, NULL);
        if (ret != BT_COMPONENT_STATUS_OK) {
This page took 0.034499 seconds and 4 git commands to generate.