core: update logging in misc files
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004 - 2008 Red Hat, Inc.
|
* Copyright (C) 2004 - 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2005 - 2008 Novell, Inc.
|
* Copyright (C) 2005 - 2008 Novell, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include "NetworkManagerUtils.h"
|
#include "NetworkManagerUtils.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
|
#include "nm-logging.h"
|
||||||
#include "nm-device.h"
|
#include "nm-device.h"
|
||||||
#include "nm-device-wifi.h"
|
#include "nm-device-wifi.h"
|
||||||
#include "nm-device-ethernet.h"
|
#include "nm-device-ethernet.h"
|
||||||
@@ -85,13 +86,13 @@ nm_spawn_process (const char *args)
|
|||||||
g_return_val_if_fail (args != NULL, -1);
|
g_return_val_if_fail (args != NULL, -1);
|
||||||
|
|
||||||
if (!g_shell_parse_argv (args, &num_args, &argv, &error)) {
|
if (!g_shell_parse_argv (args, &num_args, &argv, &error)) {
|
||||||
nm_warning ("could not parse arguments for '%s': %s", args, error->message);
|
nm_log_warn (LOGD_CORE, "could not parse arguments for '%s': %s", args, error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, &error)) {
|
if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, &error)) {
|
||||||
nm_warning ("could not spawn process '%s': %s", args, error->message);
|
nm_log_warn (LOGD_CORE, "could not spawn process '%s': %s", args, error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +395,7 @@ nm_utils_call_dispatcher (const char *action,
|
|||||||
NM_DISPATCHER_DBUS_PATH,
|
NM_DISPATCHER_DBUS_PATH,
|
||||||
NM_DISPATCHER_DBUS_IFACE);
|
NM_DISPATCHER_DBUS_IFACE);
|
||||||
if (!proxy) {
|
if (!proxy) {
|
||||||
nm_warning ("Error: could not get dispatcher proxy!");
|
nm_log_err (LOGD_CORE, "could not get dispatcher proxy!");
|
||||||
g_object_unref (dbus_mgr);
|
g_object_unref (dbus_mgr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -15,13 +15,14 @@
|
|||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Red Hat, Inc.
|
* Copyright (C) 2008 - 2010 Red Hat, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "nm-active-connection.h"
|
#include "nm-active-connection.h"
|
||||||
#include "NetworkManager.h"
|
#include "NetworkManager.h"
|
||||||
#include "nm-active-connection-glue.h"
|
#include "nm-active-connection-glue.h"
|
||||||
|
#include "nm-logging.h"
|
||||||
|
|
||||||
char *
|
char *
|
||||||
nm_active_connection_get_next_object_path (void)
|
nm_active_connection_get_next_object_path (void)
|
||||||
@@ -54,7 +55,7 @@ nm_active_connection_scope_to_value (NMConnection *connection, GValue *value)
|
|||||||
g_value_set_string (value, NM_DBUS_SERVICE_USER_SETTINGS);
|
g_value_set_string (value, NM_DBUS_SERVICE_USER_SETTINGS);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("%s: unknown connection scope!", __func__);
|
nm_log_err (LOGD_CORE, "unknown connection scope!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,10 +16,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Novell, Inc.
|
* Copyright (C) 2007 Novell, Inc.
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nm-call-store.h"
|
#include "nm-call-store.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-logging.h"
|
||||||
|
|
||||||
NMCallStore *
|
NMCallStore *
|
||||||
nm_call_store_new (void)
|
nm_call_store_new (void)
|
||||||
@@ -68,12 +69,12 @@ nm_call_store_remove (NMCallStore *store,
|
|||||||
|
|
||||||
call_ids_hash = g_hash_table_lookup (store, object);
|
call_ids_hash = g_hash_table_lookup (store, object);
|
||||||
if (!call_ids_hash) {
|
if (!call_ids_hash) {
|
||||||
nm_warning ("Trying to remove a non-existant call id.");
|
nm_log_warn (LOGD_CORE, "Trying to remove a non-existant call id.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_hash_table_remove (call_ids_hash, call_id))
|
if (!g_hash_table_remove (call_ids_hash, call_id))
|
||||||
nm_warning ("Trying to remove a non-existant call id.");
|
nm_log_warn (LOGD_CORE, "Trying to remove a non-existant call id.");
|
||||||
|
|
||||||
if (g_hash_table_size (call_ids_hash) == 0) {
|
if (g_hash_table_size (call_ids_hash) == 0) {
|
||||||
g_hash_table_remove (store, object);
|
g_hash_table_remove (store, object);
|
||||||
@@ -162,7 +163,7 @@ nm_call_store_foreach (NMCallStore *store,
|
|||||||
|
|
||||||
call_ids_hash = g_hash_table_lookup (store, object);
|
call_ids_hash = g_hash_table_lookup (store, object);
|
||||||
if (!call_ids_hash) {
|
if (!call_ids_hash) {
|
||||||
nm_warning ("Object not in store");
|
nm_log_warn (LOGD_CORE, "Object not in store");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 - 2008 Red Hat, Inc.
|
* Copyright (C) 2005 - 2010 Red Hat, Inc.
|
||||||
* Copyright (C) 2005 - 2008 Novell, Inc.
|
* Copyright (C) 2005 - 2008 Novell, Inc.
|
||||||
* Copyright (C) 2005 Ray Strode
|
* Copyright (C) 2005 Ray Strode
|
||||||
*
|
*
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "NetworkManager.h"
|
#include "NetworkManager.h"
|
||||||
#include "nm-system.h"
|
#include "nm-system.h"
|
||||||
#include "nm-netlink-monitor.h"
|
#include "nm-netlink-monitor.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-logging.h"
|
||||||
#include "nm-marshal.h"
|
#include "nm-marshal.h"
|
||||||
#include "nm-netlink.h"
|
#include "nm-netlink.h"
|
||||||
|
|
||||||
@@ -407,9 +407,9 @@ deferred_emit_carrier_state (gpointer user_data)
|
|||||||
/* Update the link cache with latest state, and if there are no errors
|
/* Update the link cache with latest state, and if there are no errors
|
||||||
* emit the link states for all the interfaces in the cache.
|
* emit the link states for all the interfaces in the cache.
|
||||||
*/
|
*/
|
||||||
if (nl_cache_refill (priv->nlh, priv->nlh_link_cache))
|
if (nl_cache_refill (priv->nlh, priv->nlh_link_cache)) {
|
||||||
nm_warning ("error updating link cache: %s", nl_geterror ());
|
nm_log_err (LOGD_HW, "error updating link cache: %s", nl_geterror ());
|
||||||
else {
|
} else {
|
||||||
nl_cache_foreach_filter (priv->nlh_link_cache,
|
nl_cache_foreach_filter (priv->nlh_link_cache,
|
||||||
NULL,
|
NULL,
|
||||||
netlink_object_message_handler,
|
netlink_object_message_handler,
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "nm-netlink.h"
|
#include "nm-netlink.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-logging.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -40,7 +40,7 @@ get_link_cache (void)
|
|||||||
|
|
||||||
nlh = nm_netlink_get_default_handle ();
|
nlh = nm_netlink_get_default_handle ();
|
||||||
if (G_UNLIKELY (!nlh)) {
|
if (G_UNLIKELY (!nlh)) {
|
||||||
nm_warning ("couldn't allocate netlink handle.");
|
nm_log_err (LOGD_HW, "couldn't allocate netlink handle.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ get_link_cache (void)
|
|||||||
link_cache = rtnl_link_alloc_cache (nlh);
|
link_cache = rtnl_link_alloc_cache (nlh);
|
||||||
|
|
||||||
if (G_UNLIKELY (!link_cache)) {
|
if (G_UNLIKELY (!link_cache)) {
|
||||||
nm_warning ("couldn't allocate netlink link cache: %s", nl_geterror ());
|
nm_log_err (LOGD_HW, "couldn't allocate netlink link cache: %s", nl_geterror ());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,12 +71,12 @@ nm_netlink_get_default_handle (void)
|
|||||||
cb = nl_cb_alloc(NL_CB_VERBOSE);
|
cb = nl_cb_alloc(NL_CB_VERBOSE);
|
||||||
def_nl_handle = nl_handle_alloc_cb (cb);
|
def_nl_handle = nl_handle_alloc_cb (cb);
|
||||||
if (!def_nl_handle) {
|
if (!def_nl_handle) {
|
||||||
nm_warning ("couldn't allocate netlink handle.");
|
nm_log_err (LOGD_HW, "couldn't allocate netlink handle.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nl_connect (def_nl_handle, NETLINK_ROUTE) < 0) {
|
if (nl_connect (def_nl_handle, NETLINK_ROUTE) < 0) {
|
||||||
nm_error ("couldn't connect to netlink: %s", nl_geterror ());
|
nm_log_err (LOGD_HW, "couldn't connect to netlink: %s", nl_geterror ());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ nm_netlink_index_to_iface (int idx)
|
|||||||
|
|
||||||
buf = g_malloc0 (MAX_IFACE_LEN);
|
buf = g_malloc0 (MAX_IFACE_LEN);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
nm_warning ("Not enough memory to allocate interface name buffer.");
|
nm_log_warn (LOGD_HW, "Not enough memory to allocate interface name buffer.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <nm-setting-8021x.h>
|
#include <nm-setting-8021x.h>
|
||||||
#include <nm-setting-wireless-security.h>
|
#include <nm-setting-wireless-security.h>
|
||||||
#include "nm-utils.h"
|
#include "nm-logging.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_secrets_provider_interface_init (gpointer g_iface)
|
nm_secrets_provider_interface_init (gpointer g_iface)
|
||||||
@@ -108,7 +108,7 @@ nm_secrets_provider_interface_get_secrets (NMSecretsProviderInterface *self,
|
|||||||
connection, setting_name, request_new, caller, hint1, hint2,
|
connection, setting_name, request_new, caller, hint1, hint2,
|
||||||
&success);
|
&success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
nm_warning ("failed to get connection secrets.");
|
nm_log_warn (LOGD_CORE, "failed to get connection secrets.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ nm_secrets_provider_interface_get_secrets_result (NMSecretsProviderInterface *se
|
|||||||
|
|
||||||
hash = g_hash_table_lookup (settings, name);
|
hash = g_hash_table_lookup (settings, name);
|
||||||
if (!hash) {
|
if (!hash) {
|
||||||
nm_warning ("couldn't get setting secrets for '%s'", name);
|
nm_log_warn (LOGD_CORE, "couldn't get setting secrets for '%s'", name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user