diff --git a/src/dhcp/nm-dhcp-helper.c b/src/dhcp/nm-dhcp-helper.c index 2b48d7a5f0..7f1d2a7b49 100644 --- a/src/dhcp/nm-dhcp-helper.c +++ b/src/dhcp/nm-dhcp-helper.c @@ -118,7 +118,7 @@ kill_pid (void) if (pid_str) pid = strtol (pid_str, NULL, 10); if (pid) { - _LOGI ("a fatal error occured, kill dhclient instance with pid %d\n", pid); + _LOGI ("a fatal error occurred, kill dhclient instance with pid %d", pid); kill (pid, SIGTERM); } } diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c index b51c6e7b24..3eb91de099 100644 --- a/src/dhcp/nm-dhcp-systemd.c +++ b/src/dhcp/nm-dhcp-systemd.c @@ -897,7 +897,7 @@ ip6_start (NMDhcpClient *client, } if (needed_prefixes > 0) { - _LOGW ("dhcp-client6: prefix delegation not yet supported, won't supply %d prefixes\n", + _LOGW ("dhcp-client6: prefix delegation not yet supported, won't supply %d prefixes", needed_prefixes); } diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c index 544f19c107..07c4805226 100644 --- a/src/dns/nm-dns-systemd-resolved.c +++ b/src/dns/nm-dns-systemd-resolved.c @@ -129,7 +129,7 @@ call_done (GObject *source, GAsyncResult *r, gpointer user_data) if (!v) { if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) return; - _LOGW ("Failed: %s\n", error->message); + _LOGW ("Failed: %s", error->message); g_error_free (error); } } diff --git a/src/nm-config.c b/src/nm-config.c index 102070e951..6b5c73dcae 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -892,7 +892,7 @@ read_base_config (GKeyFile *keyfile, } if (!g_error_matches (my_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND)) { - _LOGW ("Old default config file invalid: %s\n", + _LOGW ("Old default config file invalid: %s", my_error->message); } g_clear_error (&my_error); @@ -904,7 +904,7 @@ read_base_config (GKeyFile *keyfile, } if (!g_error_matches (my_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND)) { - _LOGW ("Default config file invalid: %s\n", + _LOGW ("Default config file invalid: %s", my_error->message); g_propagate_error (error, my_error); return FALSE; @@ -915,7 +915,7 @@ read_base_config (GKeyFile *keyfile, * config file path. */ *out_config_main_file = g_strdup (DEFAULT_CONFIG_MAIN_FILE); - _LOGI ("No config file found or given; using %s\n", + _LOGI ("No config file found or given; using %s", DEFAULT_CONFIG_MAIN_FILE); return TRUE; } diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c b/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c index d926829fb1..73ecc2f9c6 100644 --- a/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c +++ b/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c @@ -126,17 +126,17 @@ _recursive_ifparser (if_parser *parser, const char *eni_file, int quiet) /* Check if interfaces file exists and open it */ if (!g_file_test (eni_file, G_FILE_TEST_EXISTS)) { if (!quiet) - _LOGW ("interfaces file %s doesn't exist\n", eni_file); + _LOGW ("interfaces file %s doesn't exist", eni_file); return; } inp = fopen (eni_file, "re"); if (inp == NULL) { if (!quiet) - _LOGW ("Can't open %s\n", eni_file); + _LOGW ("Can't open %s", eni_file); return; } if (!quiet) - _LOGI (" interface-parser: parsing file %s\n", eni_file); + _LOGI (" interface-parser: parsing file %s", eni_file); while (!feof (inp)) { char *token[128]; /* 255 chars can only be split into 127 tokens */ @@ -154,7 +154,7 @@ _recursive_ifparser (if_parser *parser, const char *eni_file, int quiet) if (!feof (inp) && len > 0 && line[len-1] != '\n') { if (!skip_long_line) { if (!quiet) - _LOGW ("Skipping over-long-line '%s...'\n", line); + _LOGW ("Skipping over-long-line '%s...'", line); } skip_long_line = 1; continue; @@ -192,7 +192,7 @@ _recursive_ifparser (if_parser *parser, const char *eni_file, int quiet) if (toknum < 2) { if (!quiet) { - _LOGW ("Can't parse interface line '%s'\n", + _LOGW ("Can't parse interface line '%s'", join_values_with_spaces (value, token)); } skip_to_block = 1; @@ -207,7 +207,7 @@ _recursive_ifparser (if_parser *parser, const char *eni_file, int quiet) if (nm_streq (token[0], "iface")) { if (toknum < 4) { if (!quiet) { - _LOGW ("Can't parse iface line '%s'\n", + _LOGW ("Can't parse iface line '%s'", join_values_with_spaces (value, token)); } continue; @@ -254,7 +254,7 @@ _recursive_ifparser (if_parser *parser, const char *eni_file, int quiet) else { if (skip_to_block) { if (!quiet) { - _LOGW ("ignoring out-of-block data '%s'\n", + _LOGW ("ignoring out-of-block data '%s'", join_values_with_spaces (value, token)); } } else @@ -264,7 +264,7 @@ _recursive_ifparser (if_parser *parser, const char *eni_file, int quiet) fclose (inp); if (!quiet) - _LOGI (" interface-parser: finished parsing file %s\n", eni_file); + _LOGI (" interface-parser: finished parsing file %s", eni_file); } static void @@ -283,12 +283,12 @@ _ifparser_source (if_parser *parser, const char *path, const char *en_dir, int q abs_path = g_build_filename (en_dir, path, NULL); if (!quiet) - _LOGI (" interface-parser: source line includes interfaces file(s) %s\n", abs_path); + _LOGI (" interface-parser: source line includes interfaces file(s) %s", abs_path); /* ifupdown uses WRDE_NOCMD for wordexp. */ if (wordexp (abs_path, &we, WRDE_NOCMD)) { if (!quiet) - _LOGW ("word expansion for %s failed\n", abs_path); + _LOGW ("word expansion for %s failed", abs_path); } else { for (i = 0; i < we.we_wordc; i++) { if (dir) {