Build system: build reader plug-in stub
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 21 May 2015 19:59:16 +0000 (15:59 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 16:54:31 +0000 (12:54 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
include/babeltrace/plugin/plugin-internal.h
include/babeltrace/plugin/plugin-lib.h
include/babeltrace/plugin/plugin.h
plugins/Makefile.am
plugins/ctf/ctf-reader/reader.c
plugins/plugin.c

index f680a8b42a0cbfd9170e83cf98c2045a80a57a7e..30147db1c982e8b18e285e59bd4a43c0e625e493 100644 (file)
@@ -370,6 +370,8 @@ AC_CONFIG_FILES([
        extras/Makefile
        extras/valgrind/Makefile
        plugins/Makefile
+       plugins/ctf/Makefile
+       plugins/ctf/ctf-reader/Makefile
        babeltrace.pc
        babeltrace-ctf.pc
 ])
index a0ed98d9d00ee685f277e54e41445791ddb80edd..22d50abe20280022f0304b6bb6558fbf9c451a92 100644 (file)
@@ -32,6 +32,7 @@
 #include <babeltrace/plugin/plugin-system.h>
 #include <babeltrace/ctf-writer/ref-internal.h>
 #include <glib.h>
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
index dc0cde03ac16cdbbec2c48b2bca1926b1991ae7b..bea8665a532263ef9a3f20fe210c19cdb089d37a 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #include <babeltrace/objects.h>
-#include <babeltrace/plugin.h>
+#include <babeltrace/plugin/plugin.h>
 #include <stdint.h>
 
 #ifdef __cplusplus
index 77204d9d76e5647bc055c81e488f2ae620a40e76..d0816261e90ebcdf93f4ac4abca279ab36a8c90a 100644 (file)
@@ -27,7 +27,7 @@
  * SOFTWARE.
  */
 
-#include <errno.h>
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
index 5ef531e13b5643915db446f16de1557a9bc0f9c2..271190b8a6f63a0e17d033d29e1976a6ca9bd40b 100644 (file)
@@ -1,6 +1,6 @@
 AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
 
-SUBDIRS = .
+SUBDIRS = . ctf
 
 lib_LTLIBRARIES = libbabeltrace-plugin.la
 
@@ -17,4 +17,3 @@ libbabeltrace_plugin_la_LDFLAGS = \
 
 libbabeltrace_plugin_la_LIBADD = \
        $(top_builddir)/lib/libbabeltrace.la
-       $(top_builddir)/ctf/ir/libctf-ir.la
index f839f9b0c5aa6d4eff98541b89b9daf52d918974..5802b8b050b91db5c8ba193f7a251da941a9f53d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <babeltrace/plugin/plugin-lib.h>
 #include <babeltrace/plugin/plugin-system.h>
+#include <babeltrace/plugin/plugin.h>
 #include <glib.h>
 #include <stdio.h>
 
@@ -73,35 +74,20 @@ struct bt_notification_iterator *ctf_reader_iterator_create(
 
 struct bt_plugin *bt_plugin_lib_create(struct bt_object *params)
 {
-       enum bt_plugin_status ret;
        struct bt_plugin *plugin = NULL;
        struct ctf_reader *reader = g_new0(struct ctf_reader, 1);
 
-       if (!reader) {
-               goto error;
-       }
-
        plugin = bt_plugin_source_create(plugin_name, reader,
                ctf_reader_destroy, ctf_reader_iterator_create);
        if (!plugin) {
                goto error;
        }
-       reader = NULL;
 
-       ret = bt_plugin_set_error_stream_cb(plugin,
-               ctf_reader_set_error_stream);
-       if (ret != BT_PLUGIN_STATUS_OK) {
-               goto error;
-       }
 end:
        return plugin;
 error:
        if (reader) {
-               ctf_reader_destroy(reader);
-       }
-       if (plugin) {
-               bt_plugin_put(plugin);
-               plugin = NULL;
+               g_free(reader);
        }
        goto end;
 }
index 15f55a7f4d640585ea9fa0563add873c082dc0d4..1f5a6bbde3cc3fbb569ac912d2362804512a0fb2 100644 (file)
@@ -135,6 +135,19 @@ end:
        return ret;
 }
 
+void *bt_plugin_get_private_data(struct bt_plugin *plugin)
+{
+        void *ret = NULL;
+
+       if (!plugin) {
+               goto end;
+       }
+
+       ret = plugin->user_data;
+end:
+       return ret;
+}
+
 static
 void bt_plugin_destroy(struct bt_ctf_ref *ref)
 {
This page took 0.038296 seconds and 4 git commands to generate.