diff options
46 files changed, 190 insertions, 205 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c index 733af511fb..f5c251a814 100644 --- a/callouts/nm-dispatcher.c +++ b/callouts/nm-dispatcher.c @@ -404,8 +404,8 @@ dispatch_one_script (Request *request) request->script_watch_id = g_child_watch_add (script->pid, (GChildWatchFunc) script_watch_cb, script); request->script_timeout_id = g_timeout_add_seconds (SCRIPT_TIMEOUT, script_timeout_cb, script); } else { - g_warning ("Failed to execute script '%s': (%d) %s", - script->script, error->code, error->message); + g_warning ("Failed to execute script '%s': %s", + script->script, error->message); script->result = DISPATCH_RESULT_EXEC_FAILED; script->error = g_strdup (error->message); g_clear_error (&error); @@ -434,8 +434,8 @@ find_scripts (const char *str_action) dirname = NMD_SCRIPT_DIR_DEFAULT; if (!(dir = g_dir_open (dirname, 0, &error))) { - g_message ("Failed to open dispatcher directory '%s': (%d) %s", - dirname, error->code, error->message); + g_message ("Failed to open dispatcher directory '%s': %s", + dirname, error->message); g_error_free (error); return NULL; } diff --git a/cli/src/connections.c b/cli/src/connections.c index a393dc0ec7..7e84432f85 100644 --- a/cli/src/connections.c +++ b/cli/src/connections.c @@ -5001,8 +5001,8 @@ add_connection_cb (NMRemoteSettings *settings, if (error) { g_string_printf (nmc->return_text, - _("Error: Failed to add '%s' connection: (%d) %s"), - info->con_name, error->code, error->message); + _("Error: Failed to add '%s' connection: %s"), + info->con_name, error->message); nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; } else { printf (_("Connection '%s' (%s) successfully added.\n"), @@ -7489,10 +7489,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t g_cond_wait (&nmc_editor_cond, &nmc_editor_mutex); if (nmc_editor_error) { - printf (_("Error: Failed to save '%s' (%s) connection: (%d) %s\n"), + printf (_("Error: Failed to save '%s' (%s) connection: %s\n"), nm_connection_get_id (connection), nm_connection_get_uuid (connection), - nmc_editor_error->code, nmc_editor_error->message); + nmc_editor_error->message); g_error_free (nmc_editor_error); } else { @@ -7579,10 +7579,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t g_cond_wait (&nmc_editor_cond, &nmc_editor_mutex); if (nmc_editor_error) { - printf (_("Error: Failed to activate '%s' (%s) connection: (%d) %s\n"), + printf (_("Error: Failed to activate '%s' (%s) connection: %s\n"), nm_connection_get_id (connection), nm_connection_get_uuid (connection), - nmc_editor_error->code, nmc_editor_error->message); + nmc_editor_error->message); g_error_free (nmc_editor_error); } else { printf (_("Monitoring connection activation (press any key to continue)\n")); @@ -8029,9 +8029,9 @@ modify_connection_cb (NMRemoteConnection *connection, if (error) { g_string_printf (nmc->return_text, - _("Error: Failed to modify connection '%s': (%d) %s"), + _("Error: Failed to modify connection '%s': %s"), nm_connection_get_id (NM_CONNECTION (connection)), - error->code, error->message); + error->message); nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; } else { if (nmc->print_output == NMC_PRINT_PRETTY) diff --git a/cli/src/devices.c b/cli/src/devices.c index b531150699..5bc9ba352e 100644 --- a/cli/src/devices.c +++ b/cli/src/devices.c @@ -1860,8 +1860,8 @@ add_and_activate_cb (NMClient *client, NMActiveConnectionState state; if (error) { - g_string_printf (nmc->return_text, _("Error: Failed to add/activate new connection: (%d) %s"), - error->code, error->message); + g_string_printf (nmc->return_text, _("Error: Failed to add/activate new connection: %s"), + error->message); nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; quit (); } else { diff --git a/cli/src/network-manager.c b/cli/src/network-manager.c index ed074c6dee..5fe02104cf 100644 --- a/cli/src/network-manager.c +++ b/cli/src/network-manager.c @@ -562,8 +562,8 @@ save_hostname_cb (NMRemoteSettings *settings, GError *error, gpointer user_data) NmCli *nmc = (NmCli *) user_data; if (error) { - g_string_printf (nmc->return_text, _("Error: failed to set hostname: (%d) %s"), - error->code, error->message); + g_string_printf (nmc->return_text, _("Error: failed to set hostname: %s"), + error->message); nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; } quit (); diff --git a/libnm-glib/nm-active-connection.c b/libnm-glib/nm-active-connection.c index 6ffe54f696..9296428a31 100644 --- a/libnm-glib/nm-active-connection.c +++ b/libnm-glib/nm-active-connection.c @@ -140,8 +140,8 @@ _nm_active_connection_type_for_path (DBusGConnection *connection, else type = NM_TYPE_ACTIVE_CONNECTION; } else { - g_warning ("Error in getting active connection 'Vpn' property: (%d) %s", - error->code, error->message); + g_warning ("Error in getting active connection 'Vpn' property: %s", + error->message); g_error_free (error); type = G_TYPE_INVALID; } diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c index 2bc19f473c..c2a799e9ce 100644 --- a/libnm-glib/nm-client.c +++ b/libnm-glib/nm-client.c @@ -483,7 +483,7 @@ activate_info_complete (ActivateInfo *info, error, info->user_data); } else if (error) - g_warning ("Device activation failed: (%d) %s", error->code, error->message); + g_warning ("Device activation failed: %s", error->message); priv->pending_activations = g_slist_remove (priv->pending_activations, info); } @@ -1806,8 +1806,8 @@ constructed (GObject *object) GError *error = NULL; if (!nm_utils_init (&error)) { - g_warning ("Couldn't initilize nm-utils/crypto system: %d %s", - error->code, error->message); + g_warning ("Couldn't initilize nm-utils/crypto system: %s", + error->message); g_clear_error (&error); } diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index 8f29e142dc..d57c8fe1f2 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -2086,10 +2086,10 @@ deactivate_cb (DBusGProxy *proxy, if (info->fn) info->fn (info->device, error, info->user_data); else if (error) { - g_warning ("%s: device %s deactivation failed: (%d) %s", + g_warning ("%s: device %s deactivation failed: %s", __func__, nm_object_get_path (NM_OBJECT (info->device)), - error->code, error->message); + error->message); } g_clear_error (&error); diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c index c80b1594a9..bb1d579ce3 100644 --- a/libnm-glib/nm-object.c +++ b/libnm-glib/nm-object.c @@ -1288,11 +1288,10 @@ _nm_object_reload_property (NMObject *object, G_TYPE_INVALID, G_TYPE_VALUE, &value, G_TYPE_INVALID)) { - dbgmsg ("%s: Error getting '%s' for %s: (%d) %s\n", + dbgmsg ("%s: Error getting '%s' for %s: %s\n", __func__, prop_name, nm_object_get_path (object), - err->code, err->message); g_clear_error (&err); return; diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index 1cd33ccde9..f4a56c6faf 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -457,10 +457,10 @@ replace_settings (NMRemoteConnection *self, GHashTable *new_settings) if (nm_connection_replace_settings (NM_CONNECTION (self), new_settings, &error)) g_signal_emit (self, signals[UPDATED], 0, new_settings); else { - g_warning ("%s: error updating connection %s settings: (%d) %s", + g_warning ("%s: error updating connection %s settings: %s", __func__, nm_connection_get_path (NM_CONNECTION (self)), - error->code, error->message); + error->message); g_clear_error (&error); g_signal_emit (self, signals[REMOVED], 0); diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index 4f8695a83c..907480c73f 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -565,9 +565,8 @@ fetch_connections_done (DBusGProxy *proxy, if ( !g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN) && !g_error_matches (error, DBUS_GERROR, DBUS_GERROR_NAME_HAS_NO_OWNER) && priv->service_running) { - g_warning ("%s: error fetching connections: (%d) %s.", + g_warning ("%s: error fetching connections: %s.", __func__, - error->code, error->message); } g_clear_error (&error); diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c index bccdf75b23..5ca539e6a8 100644 --- a/libnm-glib/nm-secret-agent.c +++ b/libnm-glib/nm-secret-agent.c @@ -339,8 +339,8 @@ verify_request (NMSecretAgent *self, g_set_error (error, NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, - "Invalid connection: (%d) %s", - local->code, local->message); + "Invalid connection: %s", + local->message); g_clear_error (&local); } diff --git a/libnm-glib/nm-vpn-plugin.c b/libnm-glib/nm-vpn-plugin.c index 52f757eabe..8cb8f3b077 100644 --- a/libnm-glib/nm-vpn-plugin.c +++ b/libnm-glib/nm-vpn-plugin.c @@ -449,8 +449,7 @@ _connect_generic (NMVPNPlugin *plugin, connection = nm_connection_new_from_hash (properties, &local); if (!connection) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, - "Invalid connection: (%d) %s", - local->code, local->message); + "Invalid connection: %s", local->message); g_clear_error (&local); return FALSE; } @@ -525,9 +524,9 @@ impl_vpn_plugin_need_secrets (NMVPNPlugin *plugin, g_set_error (err, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, - "The connection was invalid: '%s' / '%s' invalid: %d.", + "The connection was invalid: '%s' / '%s' invalid.", g_type_name (nm_connection_lookup_setting_type_by_quark (cnfh_err->domain)), - cnfh_err->message, cnfh_err->code); + cnfh_err->message); g_error_free (cnfh_err); return FALSE; } @@ -578,8 +577,8 @@ impl_vpn_plugin_new_secrets (NMVPNPlugin *plugin, connection = nm_connection_new_from_hash (properties, &local); if (!connection) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, - "Invalid connection: (%d) %s", - local->code, local->message); + "Invalid connection: %s", + local->message); g_clear_error (&local); return FALSE; } diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c index 27a05a61d6..cb47e2db78 100644 --- a/libnm-util/nm-setting-8021x.c +++ b/libnm-util/nm-setting-8021x.c @@ -2849,8 +2849,8 @@ set_property (GObject *object, guint prop_id, } priv->ca_cert = set_cert_prop_helper (value, NM_SETTING_802_1X_CA_CERT, &error); if (error) { - g_warning ("Error setting certificate (invalid data): (%d) %s", - error->code, error->message); + g_warning ("Error setting certificate (invalid data): %s", + error->message); g_error_free (error); } break; @@ -2873,8 +2873,8 @@ set_property (GObject *object, guint prop_id, } priv->client_cert = set_cert_prop_helper (value, NM_SETTING_802_1X_CLIENT_CERT, &error); if (error) { - g_warning ("Error setting certificate (invalid data): (%d) %s", - error->code, error->message); + g_warning ("Error setting certificate (invalid data): %s", + error->message); g_error_free (error); } break; @@ -2905,8 +2905,8 @@ set_property (GObject *object, guint prop_id, } priv->phase2_ca_cert = set_cert_prop_helper (value, NM_SETTING_802_1X_PHASE2_CA_CERT, &error); if (error) { - g_warning ("Error setting certificate (invalid data): (%d) %s", - error->code, error->message); + g_warning ("Error setting certificate (invalid data): %s", + error->message); g_error_free (error); } break; @@ -2929,8 +2929,8 @@ set_property (GObject *object, guint prop_id, } priv->phase2_client_cert = set_cert_prop_helper (value, NM_SETTING_802_1X_PHASE2_CLIENT_CERT, &error); if (error) { - g_warning ("Error setting certificate (invalid data): (%d) %s", - error->code, error->message); + g_warning ("Error setting certificate (invalid data): %s", + error->message); g_error_free (error); } break; @@ -2956,8 +2956,8 @@ set_property (GObject *object, guint prop_id, } priv->private_key = set_cert_prop_helper (value, NM_SETTING_802_1X_PRIVATE_KEY, &error); if (error) { - g_warning ("Error setting private key (invalid data): (%d) %s", - error->code, error->message); + g_warning ("Error setting private key (invalid data): %s", + error->message); g_error_free (error); } break; @@ -2975,8 +2975,8 @@ set_property (GObject *object, guint prop_id, } priv->phase2_private_key = set_cert_prop_helper (value, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, &error); if (error) { - g_warning ("Error setting private key (invalid data): (%d) %s", - error->code, error->message); + g_warning ("Error setting private key (invalid data): %s", + error->message); g_error_free (error); } break; @@ -3691,8 +3691,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) /* Initialize crypto lbrary. */ if (!nm_utils_init (&error)) { - g_warning ("Couldn't initilize nm-utils/crypto system: %d %s", - error->code, error->message); + g_warning ("Couldn't initilize nm-utils/crypto system: %s", + error->message); g_error_free (error); } } diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index 59bb5f6aea..47d0e8e457 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -1489,8 +1489,8 @@ nm_utils_uuid_generate_from_string (const char *s) char *buf = NULL; if (!nm_utils_init (&error)) { - g_warning ("error initializing crypto: (%d) %s", - error->code, error->message); + g_warning ("error initializing crypto: %s", + error->message); if (error) g_error_free (error); return NULL; @@ -1498,8 +1498,8 @@ nm_utils_uuid_generate_from_string (const char *s) uuid = g_malloc0 (sizeof (*uuid)); if (!crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (*uuid), &error)) { - g_warning ("error generating UUID: (%d) %s", - error->code, error->message); + g_warning ("error generating UUID: %s", + error->message); if (error) g_error_free (error); goto out; diff --git a/libnm-util/tests/test-crypto.c b/libnm-util/tests/test-crypto.c index c11b6392f0..7265348f8e 100644 --- a/libnm-util/tests/test-crypto.c +++ b/libnm-util/tests/test-crypto.c @@ -100,8 +100,8 @@ test_load_cert (const char *path, const char *desc) array = crypto_load_and_verify_certificate (path, &format, &error); ASSERT (array != NULL, desc, - "couldn't read certificate file '%s': %d %s", - path, error->code, error->message); + "couldn't read certificate file '%s': %s", + path, error->message); ASSERT (format == NM_CRYPTO_FILE_FORMAT_X509, desc, "%s: unexpected certificate format (expected %d, got %d)", @@ -152,8 +152,8 @@ test_load_private_key (const char *path, } ASSERT (array != NULL, desc, - "couldn't read private key file '%s': %d %s", - path, error->code, error->message); + "couldn't read private key file '%s': %s", + path, error->message); ASSERT (key_type == NM_CRYPTO_KEY_TYPE_RSA, desc, "%s: unexpected private key type (expected %d, got %d)", @@ -163,8 +163,8 @@ test_load_private_key (const char *path, /* Compare the crypto decrypted key against a known-good decryption */ decrypted = file_to_byte_array (decrypted_path); ASSERT (decrypted != NULL, desc, - "couldn't read decrypted private key file '%s': %d %s", - decrypted_path, error->code, error->message); + "couldn't read decrypted private key file '%s': %s", + decrypted_path, error->message); ASSERT (decrypted->len > 0, desc, "decrypted key file invalid (size 0)"); @@ -199,8 +199,8 @@ test_load_pkcs12 (const char *path, } else { ASSERT (format == NM_CRYPTO_FILE_FORMAT_PKCS12, desc, "%s: unexpected PKCS#12 private key file format (expected %d, got " - "%d): %d %s", - path, NM_CRYPTO_FILE_FORMAT_PKCS12, format, error->code, error->message); + "%d): %s", + path, NM_CRYPTO_FILE_FORMAT_PKCS12, format, error->message); } } @@ -214,8 +214,8 @@ test_load_pkcs12_no_password (const char *path, const char *desc) format = crypto_verify_private_key (path, NULL, &error); ASSERT (format == NM_CRYPTO_FILE_FORMAT_PKCS12, desc, "%s: unexpected PKCS#12 private key file format (expected %d, got " - "%d): %d %s", - path, NM_CRYPTO_FILE_FORMAT_PKCS12, format, error->code, error->message); + "%d): %s", + path, NM_CRYPTO_FILE_FORMAT_PKCS12, format, error->message); } static void @@ -251,8 +251,8 @@ test_load_pkcs8 (const char *path, } else { ASSERT (format == NM_CRYPTO_FILE_FORMAT_RAW_KEY, desc, "%s: unexpected PKCS#8 private key file format (expected %d, got " - "%d): %d %s", - path, NM_CRYPTO_FILE_FORMAT_RAW_KEY, format, error->code, error->message); + "%d): %s", + path, NM_CRYPTO_FILE_FORMAT_RAW_KEY, format, error->message); } } @@ -289,8 +289,8 @@ test_encrypt_private_key (const char *path, array = crypto_decrypt_private_key (path, password, &key_type, &error); ASSERT (array != NULL, desc, - "couldn't read private key file '%s': %d %s", - path, error->code, error->message); + "couldn't read private key file '%s': %s", + path, error->message); ASSERT (key_type == NM_CRYPTO_KEY_TYPE_RSA, desc, "%s: unexpected private key type (expected %d, got %d)", @@ -302,15 +302,15 @@ test_encrypt_private_key (const char *path, else encrypted = nm_utils_rsa_key_encrypt (array, password, NULL, &error); ASSERT (encrypted != NULL, desc, - "couldn't re-encrypt private key file '%s': %d %s", - path, error->code, error->message); + "couldn't re-encrypt private key file '%s': %s", + path, error->message); /* Then re-decrypt the private key */ key_type = NM_CRYPTO_KEY_TYPE_UNKNOWN; re_decrypted = crypto_decrypt_private_key_data (encrypted, password, &key_type, &error); ASSERT (re_decrypted != NULL, desc, - "couldn't read private key file '%s': %d %s", - path, error->code, error->message); + "couldn't read private key file '%s': %s", + path, error->message); ASSERT (key_type == NM_CRYPTO_KEY_TYPE_RSA, desc, "%s: unexpected private key type (expected %d, got %d)", diff --git a/src/devices/bluetooth/nm-bluez-device.c b/src/devices/bluetooth/nm-bluez-device.c index e131fb778c..df67ec8667 100644 --- a/src/devices/bluetooth/nm-bluez-device.c +++ b/src/devices/bluetooth/nm-bluez-device.c @@ -245,8 +245,8 @@ pan_connection_check_create (NMBluezDevice *self) priv->pan_connection_original = connection; nm_log_dbg (LOGD_BT, "bluez[%s] added new Bluetooth connection for NAP device: '%s' (%s)", priv->path, id, uuid); } else { - nm_log_warn (LOGD_BT, "bluez[%s] couldn't add new Bluetooth connection for NAP device: '%s' (%s): %d / %s", - priv->path, id, uuid, error->code, error->message); + nm_log_warn (LOGD_BT, "bluez[%s] couldn't add new Bluetooth connection for NAP device: '%s' (%s): %s", + priv->path, id, uuid, error->message); g_clear_error (&error); g_object_unref (connection); diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index 5096b0f8b4..8f7cc34343 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -502,9 +502,9 @@ modem_ip4_config_result (NMModem *self, if (error) { nm_log_warn (LOGD_MB | LOGD_IP4 | LOGD_BT, - "(%s): retrieving IP4 configuration failed: (%d) %s", + "(%s): retrieving IP4 configuration failed: %s", nm_device_get_ip_iface (device), - error->code, error->message); + error->message); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); } else diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index dae6d95097..c1e3f54a38 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4342,8 +4342,8 @@ share_init (void) if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, share_child_setup, NULL, NULL, NULL, &status, &error)) { - nm_log_err (LOGD_SHARING, "error loading NAT module %s: (%d) %s", - *iter, error->code, error->message); + nm_log_err (LOGD_SHARING, "error loading NAT module %s: %s", + *iter, error->message); if (error) g_error_free (error); } diff --git a/src/devices/wifi/tests/test-wifi-ap-utils.c b/src/devices/wifi/tests/test-wifi-ap-utils.c index 36d58f2a8a..7fecb2efde 100644 --- a/src/devices/wifi/tests/test-wifi-ap-utils.c +++ b/src/devices/wifi/tests/test-wifi-ap-utils.c @@ -38,7 +38,7 @@ if (expected) { \ if (!success) { \ g_assert (error != NULL); \ - g_warning ("Failed to complete connection: (%d) %s", error->code, error->message); \ + g_warning ("Failed to complete connection: %s", error->message); \ } \ g_assert (success == TRUE); \ g_assert (error == NULL); \ diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index 9c3a00df96..90d2bee7c9 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -157,8 +157,8 @@ modem_ip4_config_result (NMModem *self, g_return_if_fail (nm_device_activate_ip4_state_in_conf (device) == TRUE); if (error) { - nm_log_warn (LOGD_MB | LOGD_IP4, "retrieving IP4 configuration failed: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_MB | LOGD_IP4, "retrieving IP4 configuration failed: %s", + error->message); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); } else diff --git a/src/devices/wwan/nm-modem-old.c b/src/devices/wwan/nm-modem-old.c index 73f20f5338..df7b2214ff 100644 --- a/src/devices/wwan/nm-modem-old.c +++ b/src/devices/wwan/nm-modem-old.c @@ -201,8 +201,8 @@ set_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d GError *error = NULL; if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { - nm_log_warn (LOGD_MB, "failed to enable/disable modem: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_MB, "failed to enable/disable modem: %s", + error->message); nm_modem_set_prev_state (NM_MODEM (user_data), "enable/disable failed"); } /* Wait for the state change signal to indicate enabled state changed */ @@ -266,8 +266,7 @@ stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data } if (!asked) { - nm_log_warn (LOGD_MB, "Mobile connection failed: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_MB, "Mobile connection failed: %s", error->message); g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (error)); } g_error_free (error); @@ -323,8 +322,7 @@ stage1_pin_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (priv->enable_delay_id == 0) priv->enable_delay_id = g_timeout_add_seconds (4, (GSourceFunc) do_enable, self); } else { - nm_log_warn (LOGD_MB, "GSM PIN unlock failed: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_MB, "GSM PIN unlock failed: %s", error->message); /* try to translate the error reason */ reason = translate_mm_error (error); @@ -377,8 +375,7 @@ stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_da if ((priv->caps & CAPS_3GPP) && dbus_g_error_has_name (error, MM_OLD_MODEM_ERROR_SIM_PIN)) handle_enable_pin_required (self); else { - nm_log_warn (LOGD_MB, "Modem enable failed: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_MB, "Modem enable failed: %s", error->message); /* try to translate the error reason */ reason = translate_mm_error (error); @@ -630,10 +627,8 @@ disconnect_done (DBusGProxy *proxy, GError *error = NULL; gboolean warn = GPOINTER_TO_UINT (user_data); - if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID) && warn) { - nm_log_info (LOGD_MB, "disconnect failed: (%d) %s", - error->code, error->message); - } + if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID) && warn) + nm_log_info (LOGD_MB, "disconnect failed: %s", error->message); } static void diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 3111e0a96f..bf179772da 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -357,8 +357,7 @@ ppp_stage3_ip4_config_start (NMModem *self, ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_log_err (LOGD_PPP, "error starting PPP: (%d) %s", - error->code, error->message); + nm_log_err (LOGD_PPP, "error starting PPP: %s", error->message); g_error_free (error); g_object_unref (priv->ppp_manager); diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index cd053588b1..bfe1583be4 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -384,9 +384,9 @@ dhclient_start (NMDHCPClient *client, priv->lease_file = g_strdup (g_file_get_path (dst)); } else { /* Failure; just use the existing leasefile */ - nm_log_warn (log_domain, "Failed to copy leasefile %s to %s: (%d) %s", + nm_log_warn (log_domain, "Failed to copy leasefile %s to %s: %s", g_file_get_path (src), g_file_get_path (dst), - error->code, error->message); + error->message); g_clear_error (&error); } g_object_unref (src); @@ -400,9 +400,9 @@ dhclient_start (NMDHCPClient *client, success = nm_dhcp_dhclient_save_duid (priv->lease_file, escaped, &error); g_free (escaped); if (!success) { - nm_log_warn (log_domain, "(%s): failed to save DUID to %s: (%d) %s.", + nm_log_warn (log_domain, "(%s): failed to save DUID to %s: %s.", iface, priv->lease_file, - error->code, error->message); + error->message); return -1; } } @@ -560,8 +560,8 @@ get_duid (NMDHCPClient *client) duid = nm_dhcp_dhclient_read_duid (leasefile, &error); if (error) { - nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': (%d) %s", - leasefile, error->code, error->message); + nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': %s", + leasefile, error->message); g_clear_error (&error); } g_free (leasefile); @@ -572,9 +572,9 @@ get_duid (NMDHCPClient *client) nm_log_dbg (LOGD_DHCP, "Looking for default DHCPv6 DUID in '%s'.", priv->def_leasefile); duid = nm_dhcp_dhclient_read_duid (priv->def_leasefile, &error); if (error) { - nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': (%d) %s", + nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': %s", priv->def_leasefile, - error->code, error->message); + error->message); g_clear_error (&error); } } diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c index 2e0640a9ae..33f9179581 100644 --- a/src/dns-manager/nm-dns-dnsmasq.c +++ b/src/dns-manager/nm-dns-dnsmasq.c @@ -269,9 +269,9 @@ update (NMDnsPlugin *plugin, /* Write out the config file */ if (!g_file_set_contents (CONFFILE, conf->str, -1, &error)) { - nm_log_warn (LOGD_DNS, "Failed to write dnsmasq config file %s: (%d) %s", + nm_log_warn (LOGD_DNS, "Failed to write dnsmasq config file %s: %s", CONFFILE, - error->code, error->message); + error->message); g_clear_error (&error); goto out; } diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c index c7d6a6fa5c..87027881d2 100644 --- a/src/dns-manager/nm-dns-manager.c +++ b/src/dns-manager/nm-dns-manager.c @@ -792,8 +792,8 @@ plugin_failed (NMDnsPlugin *plugin, gpointer user_data) /* Disable caching until the next DNS update */ if (!update_dns (self, TRUE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } } @@ -830,8 +830,8 @@ nm_dns_manager_add_ip4_config (NMDnsManager *mgr, priv->configs = g_slist_append (priv->configs, g_object_ref (config)); if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } @@ -863,8 +863,8 @@ nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, NMIP4Config *config) g_object_unref (config); if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } @@ -905,8 +905,8 @@ nm_dns_manager_add_ip6_config (NMDnsManager *mgr, priv->configs = g_slist_append (priv->configs, g_object_ref (config)); if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } @@ -938,8 +938,8 @@ nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, NMIP6Config *config) g_object_unref (config); if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } @@ -982,8 +982,8 @@ nm_dns_manager_set_hostname (NMDnsManager *mgr, priv->hostname = g_strdup (filtered); if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } } @@ -1037,8 +1037,8 @@ nm_dns_manager_end_updates (NMDnsManager *mgr, const char *func) /* Commit all the outstanding changes */ nm_log_dbg (LOGD_DNS, "(%s): committing DNS changes (%d)", func, priv->updates_queue); if (!update_dns (mgr, FALSE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: %s", + error->message); g_clear_error (&error); } @@ -1138,8 +1138,8 @@ dispose (GObject *object) * DNS updates yet, there's no reason to touch resolv.conf on shutdown. */ if (priv->dns_touched && !update_dns (self, TRUE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes on shutdown: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_DNS, "could not commit DNS changes on shutdown: %s", + error->message); g_clear_error (&error); priv->dns_touched = FALSE; } diff --git a/src/dns-manager/nm-dns-plugin.c b/src/dns-manager/nm-dns-plugin.c index 19aa8d2eb3..b5d1f86801 100644 --- a/src/dns-manager/nm-dns-plugin.c +++ b/src/dns-manager/nm-dns-plugin.c @@ -187,8 +187,8 @@ nm_dns_plugin_child_spawn (NMDnsPlugin *self, nm_log_dbg (LOGD_DNS, "%s started with pid %d", priv->progname, priv->pid); priv->watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) watch_cb, self); } else { - nm_log_warn (LOGD_DNS, "Failed to spawn %s: (%d) %s", - priv->progname, error->code, error->message); + nm_log_warn (LOGD_DNS, "Failed to spawn %s: %s", + priv->progname, error->message); g_clear_error (&error); } diff --git a/src/firewall-manager/nm-firewall-manager.c b/src/firewall-manager/nm-firewall-manager.c index d8a52c12a8..001710ca38 100644 --- a/src/firewall-manager/nm-firewall-manager.c +++ b/src/firewall-manager/nm-firewall-manager.c @@ -106,11 +106,11 @@ add_or_change_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data G_TYPE_INVALID)) { g_assert (error); if (g_strcmp0 (error->message, "ZONE_ALREADY_SET") != 0) { - nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed [%u]: (%d) %s", - info->iface, info->id, error->code, error->message); + nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed [%u]: %s", + info->iface, info->id, error->message); } else { - nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change failed [%u]: (%d) %s", - info->iface, info->id, error->code, error->message); + nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change failed [%u]: %s", + info->iface, info->id, error->message); } } else { nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change succeeded [%u]", @@ -169,11 +169,11 @@ remove_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) g_assert (error); /* ignore UNKNOWN_INTERFACE errors */ if (error->message && !strstr (error->message, "UNKNOWN_INTERFACE")) { - nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone remove failed [%u]: (%d) %s", - info->iface, info->id, error->code, error->message); + nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone remove failed [%u]: %s", + info->iface, info->id, error->message); } else { - nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone remove failed [%u]: (%d) %s", - info->iface, info->id, error->code, error->message); + nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone remove failed [%u]: %s", + info->iface, info->id, error->message); } } else { nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone remove succeeded [%u]", diff --git a/src/main.c b/src/main.c index 5336f4b74d..863f7bcb35 100644 --- a/src/main.c +++ b/src/main.c @@ -498,8 +498,8 @@ main (int argc, char *argv[]) /* Read the config file and CLI overrides */ config = nm_config_new (&error); if (config == NULL) { - fprintf (stderr, _("Failed to read configuration: (%d) %s\n"), - error->code, error->message); + fprintf (stderr, _("Failed to read configuration: %s\n"), + error->message); exit (1); } @@ -524,9 +524,9 @@ main (int argc, char *argv[]) /* Parse the state file */ if (!parse_state_file (state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &wimax_enabled, &error)) { - fprintf (stderr, _("State file %s parsing failed: (%d) %s\n"), + fprintf (stderr, _("State file %s parsing failed: %s\n"), state_file, - error->code, error->message); + error->message); /* Not a hard failure */ } g_clear_error (&error); diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index 11927afae8..18d7d3c4b8 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -245,8 +245,8 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared) nm_log_info (LOGD_SHARING, "Executing: %s", cmd); if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, share_child_setup, NULL, NULL, NULL, &status, &error)) { - nm_log_warn (LOGD_SHARING, "Error executing command: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_SHARING, "Error executing command: %s", + error->message); g_clear_error (&error); } else if (WEXITSTATUS (status)) { nm_log_warn (LOGD_SHARING, "** Command returned exit status %d.", diff --git a/src/nm-dispatcher.c b/src/nm-dispatcher.c index c51a6cba00..35aa1bcaff 100644 --- a/src/nm-dispatcher.c +++ b/src/nm-dispatcher.c @@ -328,8 +328,7 @@ dispatcher_done_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) free_results (results); } else { g_assert (error); - nm_log_warn (LOGD_DISPATCH, "(%u) failed: (%d) %s", - info->request_id, error->code, error->message); + nm_log_warn (LOGD_DISPATCH, "(%u) failed: %s", info->request_id, error->message); } if (info->callback) diff --git a/src/nm-manager-auth.c b/src/nm-manager-auth.c index ca58df1df6..2b032cbf71 100644 --- a/src/nm-manager-auth.c +++ b/src/nm-manager-auth.c @@ -386,8 +386,8 @@ pk_call_cb (GObject *object, GAsyncResult *result, gpointer user_data) if (!call->chain->error) call->chain->error = g_error_copy (error); - nm_log_warn (LOGD_CORE, "error requesting auth for %s: (%d) %s", - call->permission, error->code, error->message); + nm_log_warn (LOGD_CORE, "error requesting auth for %s: %s", + call->permission, error->message); g_clear_error (&error); } else { guint call_result = NM_AUTH_CALL_RESULT_UNKNOWN; diff --git a/src/nm-manager.c b/src/nm-manager.c index e0cd7de006..fae1860c95 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2013,9 +2013,9 @@ platform_link_added (NMManager *self, } if (error) { - nm_log_warn (LOGD_HW, "%s: factory failed to create device: (%d) %s", + nm_log_warn (LOGD_HW, "%s: factory failed to create device: %s", plink->udi, - error->code, error->message); + error->message); g_clear_error (&error); return; } @@ -3731,9 +3731,8 @@ _internal_enable (NMManager *self, gboolean enable) G_TYPE_BOOLEAN, (gpointer) &enable, &err)) { /* Not a hard error */ - nm_log_warn (LOGD_SUSPEND, "writing to state file %s failed: (%d) %s.", + nm_log_warn (LOGD_SUSPEND, "writing to state file %s failed: %s.", priv->state_file, - err->code, err->message); } } @@ -4495,9 +4494,9 @@ manager_radio_user_toggled (NMManager *self, "main", rstate->key, G_TYPE_BOOLEAN, (gpointer) &enabled, &error)) { - nm_log_warn (LOGD_CORE, "writing to state file %s failed: (%d) %s.", + nm_log_warn (LOGD_CORE, "writing to state file %s failed: %s.", priv->state_file, - error->code, error->message); + error->message); g_clear_error (&error); } } diff --git a/src/nm-policy.c b/src/nm-policy.c index b1a6275650..d35e1bef13 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1021,9 +1021,9 @@ auto_activate_device (gpointer user_data) data->device, subject, &error)) { - nm_log_info (LOGD_DEVICE, "Connection '%s' auto-activation failed: (%d) %s", + nm_log_info (LOGD_DEVICE, "Connection '%s' auto-activation failed: %s", nm_connection_get_id (best_connection), - error->code, error->message); + error->message); g_error_free (error); } g_object_unref (subject); @@ -1398,9 +1398,9 @@ activate_secondary_connections (NMPolicy *policy, if (ac) secondary_ac_list = g_slist_append (secondary_ac_list, g_object_ref (ac)); else { - nm_log_warn (LOGD_DEVICE, "Secondary connection '%s (%s)' auto-activation failed: (%d) %s", + nm_log_warn (LOGD_DEVICE, "Secondary connection '%s (%s)' auto-activation failed: %s", nm_connection_get_id (NM_CONNECTION (settings_con)), sec_uuid, - error->code, error->message); + error->message); g_clear_error (&error); success = FALSE; break; @@ -1985,9 +1985,9 @@ _deactivate_if_active (NMManager *manager, NMConnection *connection) nm_active_connection_get_path (ac), NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, &error)) { - nm_log_warn (LOGD_DEVICE, "Connection '%s' disappeared, but error deactivating it: (%d) %s", + nm_log_warn (LOGD_DEVICE, "Connection '%s' disappeared, but error deactivating it: %s", nm_connection_get_id (connection), - error->code, error->message); + error->message); g_clear_error (&error); } } diff --git a/src/ppp-manager/nm-pppd-plugin.c b/src/ppp-manager/nm-pppd-plugin.c index 94393233fc..2f7a5651dd 100644 --- a/src/ppp-manager/nm-pppd-plugin.c +++ b/src/ppp-manager/nm-pppd-plugin.c @@ -275,8 +275,8 @@ get_credentials (char *username, char *password) G_TYPE_STRING, &my_username, G_TYPE_STRING, &my_password, G_TYPE_INVALID)) { - g_warning ("nm-ppp-plugin: (%s): could not get secrets: (%d) %s", - __func__, err->code, err->message); + g_warning ("nm-ppp-plugin: (%s): could not get secrets: %s", + __func__, err->message); g_error_free (err); return -1; } @@ -331,8 +331,8 @@ plugin_init (void) bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err); if (!bus) { - g_warning ("nm-pppd-plugin: (%s): couldn't connect to system bus: (%d) %s", - __func__, err->code, err->message); + g_warning ("nm-pppd-plugin: (%s): couldn't connect to system bus: %s", + __func__, err->message); g_error_free (err); return -1; } diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c index 08c7be2301..bcf6acd64e 100644 --- a/src/settings/nm-agent-manager.c +++ b/src/settings/nm-agent-manager.c @@ -220,8 +220,8 @@ agent_register_permissions_done (NMAuthChain *chain, if (error) { local = g_error_new (NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED, - "Failed to request agent permissions: (%d) %s", - error->code, error->message); + "Failed to request agent permissions: %s", + error->message); dbus_g_method_return_error (context, local); g_error_free (local); } else { @@ -810,10 +810,10 @@ get_done_cb (NMSecretAgent *agent, g_return_if_fail (call_id == parent->current_call_id); if (error) { - nm_log_dbg (LOGD_AGENTS, "(%s) agent failed secrets request %p/%s/%s: (%d) %s", + nm_log_dbg (LOGD_AGENTS, "(%s) agent failed secrets request %p/%s/%s: %s", nm_secret_agent_get_description (agent), req, parent->detail, req->setting_name, - error->code, error->message); + error->message); if (dbus_g_error_has_name (error, NM_DBUS_INTERFACE_SECRET_AGENT ".UserCanceled")) { error = g_error_new_literal (NM_AGENT_MANAGER_ERROR, @@ -946,10 +946,10 @@ get_agent_modify_auth_cb (NMAuthChain *chain, req->chain = NULL; if (error) { - nm_log_dbg (LOGD_AGENTS, "(%s) agent %p/%s/%s MODIFY check error: (%d) %s", + nm_log_dbg (LOGD_AGENTS, "(%s) agent %p/%s/%s MODIFY check error: %s", nm_secret_agent_get_description (parent->current), req, parent->detail, req->setting_name, - error->code, error->message); + error->message); /* Try the next agent */ request_next_agent (parent); } else { @@ -1246,10 +1246,10 @@ save_done_cb (NMSecretAgent *agent, g_return_if_fail (call_id == parent->current_call_id); if (error) { - nm_log_dbg (LOGD_AGENTS, "(%s) agent failed save secrets request %p/%s: (%d) %s", + nm_log_dbg (LOGD_AGENTS, "(%s) agent failed save secrets request %p/%s: %s", nm_secret_agent_get_description (agent), req, parent->detail, - error->code, error->message); + error->message); /* Try the next agent */ request_next_agent (parent); return; @@ -1337,9 +1337,9 @@ delete_done_cb (NMSecretAgent *agent, g_return_if_fail (call_id == req->current_call_id); if (error) { - nm_log_dbg (LOGD_AGENTS, "(%s) agent failed delete secrets request %p/%s: (%d) %s", + nm_log_dbg (LOGD_AGENTS, "(%s) agent failed delete secrets request %p/%s: %s", nm_secret_agent_get_description (agent), req, req->detail, - error->code, error->message); + error->message); } else { nm_log_dbg (LOGD_AGENTS, "(%s) agent deleted secrets for request %p/%s", nm_secret_agent_get_description (agent), req, req->detail); diff --git a/src/settings/nm-secret-agent.c b/src/settings/nm-secret-agent.c index ff675e0459..e4a16f4f81 100644 --- a/src/settings/nm-secret-agent.c +++ b/src/settings/nm-secret-agent.c @@ -321,9 +321,9 @@ cancel_done (DBusGProxy *proxy, DBusGProxyCall *call_id, void *user_data) GError *error = NULL; if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { - nm_log_dbg (LOGD_AGENTS, "(%s): agent failed to cancel secrets: (%d) %s", + nm_log_dbg (LOGD_AGENTS, "(%s): agent failed to cancel secrets: %s", (const char *) user_data, - error->code, error->message); + error->message); g_clear_error (&error); } } diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index 0753add2c0..9a0f7da532 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -702,8 +702,8 @@ new_secrets_commit_cb (NMSettingsConnection *connection, gpointer user_data) { if (error) { - nm_log_warn (LOGD_SETTINGS, "Error saving new secrets to backing storage: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_SETTINGS, "Error saving new secrets to backing storage: %s", + error->message); } } @@ -730,11 +730,10 @@ agent_secrets_done_cb (NMAgentManager *manager, gboolean agent_had_system = FALSE; if (error) { - nm_log_dbg (LOGD_SETTINGS, "(%s/%s:%u) secrets request error: (%d) %s", + nm_log_dbg (LOGD_SETTINGS, "(%s/%s:%u) secrets request error: %s", nm_connection_get_uuid (NM_CONNECTION (self)), setting_name, call_id, - error->code, error->message); callback (self, call_id, NULL, setting_name, error, callback_data); @@ -842,19 +841,17 @@ agent_secrets_done_cb (NMAgentManager *manager, call_id); } } else { - nm_log_dbg (LOGD_SETTINGS, "(%s/%s:%u) failed to update with agent secrets: (%d) %s", + nm_log_dbg (LOGD_SETTINGS, "(%s/%s:%u) failed to update with agent secrets: %s", nm_connection_get_uuid (NM_CONNECTION (self)), setting_name, call_id, - local->code, local->message); } } else { - nm_log_dbg (LOGD_SETTINGS, "(%s/%s:%u) failed to update with existing secrets: (%d) %s", + nm_log_dbg (LOGD_SETTINGS, "(%s/%s:%u) failed to update with existing secrets: %s", nm_connection_get_uuid (NM_CONNECTION (self)), setting_name, call_id, - local->code, local->message); } @@ -1707,8 +1704,8 @@ nm_settings_connection_read_and_fill_timestamp (NMSettingsConnection *connection priv->timestamp = timestamp; priv->timestamp_set = TRUE; } else { - nm_log_dbg (LOGD_SETTINGS, "failed to read connection timestamp for '%s': (%d) %s", - connection_uuid, err->code, err->message); + nm_log_dbg (LOGD_SETTINGS, "failed to read connection timestamp for '%s': %s", + connection_uuid, err->message); g_clear_error (&err); } g_key_file_free (timestamps_file); diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index aace9b68cf..811e34444e 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -836,9 +836,9 @@ claim_connection (NMSettings *self, nm_utils_normalize_connection (NM_CONNECTION (connection), TRUE); if (!nm_connection_verify (NM_CONNECTION (connection), &error)) { - nm_log_warn (LOGD_SETTINGS, "plugin provided invalid connection: '%s' / '%s' invalid: %d", + nm_log_warn (LOGD_SETTINGS, "plugin provided invalid connection: '%s' / '%s' invalid", g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + error->message); g_error_free (error); return; } diff --git a/src/settings/plugins/example/plugin.c b/src/settings/plugins/example/plugin.c index f0e52d95fb..622f5de9bf 100644 --- a/src/settings/plugins/example/plugin.c +++ b/src/settings/plugins/example/plugin.c @@ -157,9 +157,9 @@ read_connections (NMSystemConfigInterface *config) dir = g_dir_open (EXAMPLE_DIR, 0, &error); if (!dir) { - nm_log_warn (LOGD_SETTINGS, "Cannot read directory '%s': (%d) %s", + nm_log_warn (LOGD_SETTINGS, "Cannot read directory '%s': %s", EXAMPLE_DIR, - error->code, error->message); + error->message); g_clear_error (&error); return; } @@ -196,11 +196,10 @@ update_connection_settings_commit_cb (NMSettingsConnection *orig, GError *error, * an error here. */ if (error) { - nm_log_warn (LOGD_SETTINGS, "%s: '%s' / '%s' invalid: %d", + nm_log_warn (LOGD_SETTINGS, "%s: '%s' / '%s' invalid", __func__, g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, - error->code); + error->message); g_clear_error (&error); nm_settings_connection_signal_remove (orig); diff --git a/src/settings/plugins/ifupdown/nm-ifupdown-connection.c b/src/settings/plugins/ifupdown/nm-ifupdown-connection.c index e30eab3c5e..2727710188 100644 --- a/src/settings/plugins/ifupdown/nm-ifupdown-connection.c +++ b/src/settings/plugins/ifupdown/nm-ifupdown-connection.c @@ -94,10 +94,10 @@ constructor (GType type, } if (!ifupdown_update_connection_from_if_block (NM_CONNECTION (object), priv->ifblock, &error)) { - nm_log_warn (LOGD_SETTINGS, "%s.%d - invalid connection read from /etc/network/interfaces: (%d) %s", + nm_log_warn (LOGD_SETTINGS, "%s.%d - invalid connection read from /etc/network/interfaces: %s", __FILE__, __LINE__, - error->code, error->message); + error->message); goto err; } diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c index dcae211c45..360c0c0046 100644 --- a/src/settings/plugins/ifupdown/plugin.c +++ b/src/settings/plugins/ifupdown/plugin.c @@ -588,8 +588,8 @@ update_system_hostname(NMInotifyHelper *inotify_helper, &hostname_file_len, &error)) { nm_log_warn (LOGD_SETTINGS, "update_system_hostname() - couldn't read " - IFUPDOWN_SYSTEM_HOSTNAME_FILE " (%d/%s)", - error->code, error->message); + IFUPDOWN_SYSTEM_HOSTNAME_FILE " (%s)", + error->message); return; } @@ -620,8 +620,8 @@ write_system_hostname(NMSystemConfigInterface *config, -1, &error)) { nm_log_warn (LOGD_SETTINGS, "update_system_hostname() - couldn't write hostname (%s) to " - IFUPDOWN_SYSTEM_HOSTNAME_FILE " (%d/%s)", - newhostname, error->code, error->message); + IFUPDOWN_SYSTEM_HOSTNAME_FILE " (%s)", + newhostname, error->message); } else { priv->hostname = g_strdup (newhostname); } diff --git a/src/settings/plugins/keyfile/plugin.c b/src/settings/plugins/keyfile/plugin.c index 3e406519da..27a6022a16 100644 --- a/src/settings/plugins/keyfile/plugin.c +++ b/src/settings/plugins/keyfile/plugin.c @@ -318,9 +318,9 @@ read_connections (NMSystemConfigInterface *config) dir = g_dir_open (KEYFILE_DIR, 0, &error); if (!dir) { - nm_log_warn (LOGD_SETTINGS, "Cannot read directory '%s': (%d) %s", + nm_log_warn (LOGD_SETTINGS, "Cannot read directory '%s': %s", KEYFILE_DIR, - error->code, error->message); + error->message); g_clear_error (&error); return; } diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c index d833cd0e15..f116cf3a5c 100644 --- a/src/supplicant-manager/nm-supplicant-manager.c +++ b/src/supplicant-manager/nm-supplicant-manager.c @@ -146,8 +146,8 @@ get_capabilities_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_ if (!dbus_g_proxy_end_call (proxy, call_id, &error, DBUS_TYPE_G_MAP_OF_VARIANT, &props, G_TYPE_INVALID)) { - nm_log_warn (LOGD_CORE, "Unexpected error requesting supplicant properties: (%d) %s", - error->code, error->message); + nm_log_warn (LOGD_CORE, "Unexpected error requesting supplicant properties: %s", + error->message); g_clear_error (&error); return; } diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index e42d676f84..bb48c9e8c8 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -1774,8 +1774,8 @@ get_secrets_cb (NMSettingsConnection *connection, priv->secrets_id = 0; if (error) { - nm_log_err (LOGD_VPN, "Failed to request VPN secrets #%d: (%d) %s", - priv->secrets_idx + 1, error->code, error->message); + nm_log_err (LOGD_VPN, "Failed to request VPN secrets #%d: %s", + priv->secrets_idx + 1, error->message); _set_vpn_state (self, STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS, FALSE); } else { /* Cache the username for later */ @@ -1857,8 +1857,8 @@ get_secrets (NMVPNConnection *self, &error); if (!priv->secrets_id) { if (error) { - nm_log_err (LOGD_VPN, "failed to request VPN secrets #%d: (%d) %s", - priv->secrets_idx + 1, error->code, error->message); + nm_log_err (LOGD_VPN, "failed to request VPN secrets #%d: %s", + priv->secrets_idx + 1, error->message); } _set_vpn_state (self, STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS, FALSE); g_clear_error (&error); diff --git a/src/vpn-manager/nm-vpn-manager.c b/src/vpn-manager/nm-vpn-manager.c index 27ad6bc757..2b86755065 100644 --- a/src/vpn-manager/nm-vpn-manager.c +++ b/src/vpn-manager/nm-vpn-manager.c @@ -151,9 +151,9 @@ try_add_service (NMVPNManager *self, const char *namefile) g_hash_table_insert (priv->services, (char *) service_name, service); nm_log_info (LOGD_VPN, "VPN: loaded %s", service_name); } else { - nm_log_warn (LOGD_VPN, "failed to load VPN service file %s: (%d) %s", + nm_log_warn (LOGD_VPN, "failed to load VPN service file %s: %s", namefile, - error->code, error->message); + error->message); g_clear_error (&error); } } diff --git a/src/vpn-manager/nm-vpn-service.c b/src/vpn-manager/nm-vpn-service.c index 8ef37fa6ad..ae433e8d44 100644 --- a/src/vpn-manager/nm-vpn-service.c +++ b/src/vpn-manager/nm-vpn-service.c @@ -213,9 +213,9 @@ nm_vpn_service_daemon_exec (NMVPNService *service, GError **error) priv->name, priv->dbus_service, (long int) pid); priv->start_timeout = g_timeout_add_seconds (5, _daemon_exec_timeout, service); } else { - nm_log_warn (LOGD_VPN, "VPN service '%s': could not launch the VPN service. error: (%d) %s.", + nm_log_warn (LOGD_VPN, "VPN service '%s': could not launch the VPN service. error: %s.", priv->name, - spawn_error->code, spawn_error->message); + spawn_error->message); g_set_error (error, NM_VPN_MANAGER_ERROR, NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED, |