summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2011-09-19 14:19:53 +0200
committerDan Williams <dcbw@redhat.com>2012-02-07 23:11:39 -0600
commit41685faa431e2e4203db8ff896e0e2f44e353b6f (patch)
tree88742dd2b43ea340c441ad88734ee42b5781de36
parent1af212f8feeacf9cfab93687337f68d4e2190100 (diff)
downloadNetworkManager-41685faa431e2e4203db8ff896e0e2f44e353b6f.tar.gz
core: print textual description for reason codes on device deactivation too
-rw-r--r--src/nm-device.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nm-device.c b/src/nm-device.c
index 14d13a715e..60ea5abfbe 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -187,6 +187,8 @@ static void addrconf6_cleanup (NMDevice *self);
static void dhcp6_cleanup (NMDevice *self, gboolean stop);
static void dhcp4_cleanup (NMDevice *self, gboolean stop);
+static const char *reason_to_string (NMDeviceStateReason reason);
+
static void
device_interface_init (NMDeviceInterface *device_interface_class)
@@ -2812,8 +2814,8 @@ nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason)
g_return_if_fail (self != NULL);
- nm_log_info (LOGD_DEVICE, "(%s): deactivating device (reason: %d).",
- nm_device_get_iface (self), reason);
+ nm_log_info (LOGD_DEVICE, "(%s): deactivating device (reason '%s') [%d]",
+ nm_device_get_iface (self), reason_to_string (reason), reason);
/* Check this before deactivate_quickly is run */
if (priv->ip6_manager || priv->ip6_config)
@@ -3725,14 +3727,8 @@ state_to_string (NMDeviceState state)
return "need-auth";
case NM_DEVICE_STATE_IP_CONFIG:
return "ip-config";
- case NM_DEVICE_STATE_IP_CHECK:
- return "ip-check";
- case NM_DEVICE_STATE_SECONDARIES:
- return "secondaries";
case NM_DEVICE_STATE_ACTIVATED:
return "activated";
- case NM_DEVICE_STATE_DEACTIVATING:
- return "deactivating";
case NM_DEVICE_STATE_FAILED:
return "failed";
default: