all: don't include error->code in log messages
GError codes are only unique per domain, so logging the code without also indicating the domain is not helpful. And anyway, if the error messages are not distinctive enough to tell the whole story then we should fix the error messages. Based-on-patch-by: Dan Winship <danw@gnome.org>
This commit is contained in:
@@ -303,8 +303,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,
|
||||
NULL, 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.",
|
||||
|
Reference in New Issue
Block a user