diff options
| author | Michael Biebl <biebl@debian.org> | 2014-07-06 03:04:17 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2014-07-06 03:04:17 +0200 |
| commit | 3ce667b6ee6b86291bbe60ef93cba7f11a5c5400 (patch) | |
| tree | af3daa7221e898b72f3de26eb2cf0c1b1c8661b0 /src/platform/tests/monitor.c | |
| parent | f02d31d95af29678092d1ff01f714621bc9dcc0f (diff) | |
| parent | 33491bc4279481db8ae47213e34a6d695a0e8830 (diff) | |
Merge tag 'upstream/0.9.10.0'
Upstream version 0.9.10.0
Diffstat (limited to 'src/platform/tests/monitor.c')
| -rw-r--r-- | src/platform/tests/monitor.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/platform/tests/monitor.c b/src/platform/tests/monitor.c new file mode 100644 index 00000000..d56cc2bf --- /dev/null +++ b/src/platform/tests/monitor.c @@ -0,0 +1,30 @@ +#include <stdlib.h> +#include <syslog.h> + +#include "nm-fake-platform.h" +#include "nm-linux-platform.h" +#include "nm-logging.h" + +int +main (int argc, char **argv) +{ + GMainLoop *loop; + +#if !GLIB_CHECK_VERSION (2, 35, 0) + g_type_init (); +#endif + + loop = g_main_loop_new (NULL, FALSE); + nm_logging_setup ("debug", NULL, NULL, NULL); + openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON); + + g_assert (argc <= 2); + if (argc > 1 && !g_strcmp0 (argv[1], "--fake")) + nm_fake_platform_setup (); + else + nm_linux_platform_setup (); + + g_main_loop_run (loop); + + return EXIT_SUCCESS; +} |