X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=tests%2Flib%2Ftest-plugin-plugins%2Fminimal.c;h=693f9db5a639153e57f0a5e903369b74f118c0b2;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hp=5ea4bde65eeec3c12b3ea1d2febdb50b778f0b10;hpb=b19ff26f04df428047676dd736bd7cc9473906fe;p=babeltrace.git diff --git a/tests/lib/test-plugin-plugins/minimal.c b/tests/lib/test-plugin-plugins/minimal.c index 5ea4bde6..693f9db5 100644 --- a/tests/lib/test-plugin-plugins/minimal.c +++ b/tests/lib/test-plugin-plugins/minimal.c @@ -1,34 +1,22 @@ /* - * Copyright (c) 2017 Philippe Proulx + * SPDX-License-Identifier: GPL-2.0-only * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; under version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * Copyright (C) 2017 Philippe Proulx */ -#include +#include #include #include -static enum bt_plugin_status plugin_init(const bt_plugin *plugin) +static bt_plugin_initialize_func_status plugin_init(bt_self_plugin *plugin) { - g_setenv("BT_TEST_PLUGIN_INIT_CALLED", "1", 1); - return BT_PLUGIN_STATUS_OK; + g_setenv("BT_TEST_PLUGIN_INITIALIZE_CALLED", "1", 1); + return BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK; } -static enum bt_plugin_status plugin_exit(void) +static void plugin_finalize(void) { - g_setenv("BT_TEST_PLUGIN_EXIT_CALLED", "1", 1); - return BT_PLUGIN_STATUS_OK; + g_setenv("BT_TEST_PLUGIN_FINALIZE_CALLED", "1", 1); } BT_PLUGIN_MODULE(); @@ -36,5 +24,5 @@ BT_PLUGIN(test_minimal); BT_PLUGIN_DESCRIPTION("Minimal Babeltrace plugin with no component classes"); BT_PLUGIN_AUTHOR("Janine Sutto"); BT_PLUGIN_LICENSE("Beerware"); -BT_PLUGIN_INIT(plugin_init); -BT_PLUGIN_EXIT(plugin_exit); +BT_PLUGIN_INITIALIZE_FUNC(plugin_init); +BT_PLUGIN_FINALIZE_FUNC(plugin_finalize);