core: dump fatal initialization errors to stderr

This commit is contained in:
Aleksander Morgado
2021-06-16 11:52:18 +02:00
parent 8905cf4670
commit 89bbc2ccb8
2 changed files with 3 additions and 3 deletions

View File

@@ -166,7 +166,7 @@ main (int argc, char *argv[])
mm_context_get_log_timestamps (), mm_context_get_log_timestamps (),
mm_context_get_log_relative_timestamps (), mm_context_get_log_relative_timestamps (),
&error)) { &error)) {
g_warning ("failed to set up logging: %s", error->message); g_printerr ("error: failed to set up logging: %s\n", error->message);
g_error_free (error); g_error_free (error);
exit (1); exit (1);
} }

View File

@@ -367,7 +367,7 @@ mm_context_init (gint argc,
g_option_context_set_help_enabled (ctx, FALSE); g_option_context_set_help_enabled (ctx, FALSE);
if (!g_option_context_parse (ctx, &argc, &argv, &error)) { if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
g_warning ("error: %s", error->message); g_printerr ("error: %s\n", error->message);
g_error_free (error); g_error_free (error);
exit (1); exit (1);
} }
@@ -396,7 +396,7 @@ mm_context_init (gint argc,
/* Initial kernel events processing may only be used if autoscan is disabled */ /* Initial kernel events processing may only be used if autoscan is disabled */
#if defined WITH_UDEV || defined WITH_QRTR #if defined WITH_UDEV || defined WITH_QRTR
if (!no_auto_scan && initial_kernel_events) { if (!no_auto_scan && initial_kernel_events) {
g_warning ("error: --initial-kernel-events must be used only if --no-auto-scan is also used"); g_printerr ("error: --initial-kernel-events must be used only if --no-auto-scan is also used\n");
exit (1); exit (1);
} }
# if defined WITH_UDEV # if defined WITH_UDEV