From 7fe250f51d2bc285dd1992dfc2910b731cda0a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 27 May 2015 10:02:07 +0200 Subject: [PATCH] device: log the device we were searching in udev --- src/devices/nm-device-ethernet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c index 14c9d187bb..8520ee7364 100644 --- a/src/devices/nm-device-ethernet.c +++ b/src/devices/nm-device-ethernet.c @@ -159,6 +159,7 @@ _update_s390_subchannels (NMDeviceEthernet *self) GUdevDevice *parent = NULL; const char *parent_path, *item, *driver; const char *subsystems[] = { "net", NULL }; + const char *iface; GDir *dir; GError *error = NULL; @@ -168,10 +169,11 @@ _update_s390_subchannels (NMDeviceEthernet *self) return; } - dev = g_udev_client_query_by_subsystem_and_name (client, "net", - nm_device_get_iface (NM_DEVICE (self))); + iface = nm_device_get_iface (NM_DEVICE (self)); + dev = iface ? g_udev_client_query_by_subsystem_and_name (client, "net", iface) : NULL; if (!dev) { - _LOGW (LOGD_DEVICE | LOGD_HW, "failed to find device with udev"); + _LOGW (LOGD_DEVICE | LOGD_HW, "failed to find device '%s' with udev", + iface ? iface : "(null)"); goto out; }