mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 21:20:20 +01:00
all: remove \n endings from log calls
The extra newlines look bad when logging to the console.
https://github.com/NetworkManager/NetworkManager/pull/223
(cherry picked from commit 02958bba80)
This commit is contained in:
parent
514aadd75b
commit
d947c27fd7
5 changed files with 16 additions and 16 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue