diff options
Diffstat (limited to 'src/nm-udev-manager.c')
| -rw-r--r-- | src/nm-udev-manager.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index 57b36d38..792e53bf 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -123,7 +123,7 @@ killswitch_new (GUdevDevice *device, RfKillType rtype) /* Sigh; try the grandparent */ grandparent = g_udev_device_get_parent (parent); if (grandparent) - driver = g_udev_device_get_property (parent, "DRIVER"); + driver = g_udev_device_get_property (grandparent, "DRIVER"); } } @@ -131,7 +131,10 @@ killswitch_new (GUdevDevice *device, RfKillType rtype) driver = "(unknown)"; ks->driver = g_strdup (driver); - if (g_strcmp0 (subsys, "platform") == 0 || g_strcmp0 (parent_subsys, "platform") == 0) + if ( g_strcmp0 (subsys, "platform") == 0 + || g_strcmp0 (parent_subsys, "platform") == 0 + || g_strcmp0 (subsys, "acpi") == 0 + || g_strcmp0 (parent_subsys, "acpi") == 0) ks->platform = TRUE; if (grandparent) @@ -204,6 +207,14 @@ recheck_killswitches (NMUdevManager *self) if (device) { sysfs_state = g_udev_device_get_property_as_int (device, "RFKILL_STATE"); dev_state = sysfs_state_to_nm_state (sysfs_state); + + nm_log_dbg (LOGD_RFKILL, "%s rfkill%s switch %s state now %d/%u", + rfkill_type_to_desc (ks->rtype), + ks->platform ? " platform" : "", + ks->name, + sysfs_state, + dev_state); + if (ks->platform == FALSE) { if (dev_state > poll_states[ks->rtype]) poll_states[ks->rtype] = dev_state; @@ -285,10 +296,11 @@ add_one_killswitch (NMUdevManager *self, GUdevDevice *device) ks = killswitch_new (device, rtype); priv->killswitches = g_slist_prepend (priv->killswitches, ks); - nm_log_info (LOGD_RFKILL, "found %s radio killswitch %s (at %s) (driver %s)", - rfkill_type_to_desc (rtype), + nm_log_info (LOGD_RFKILL, "%s: found %s radio killswitch (at %s) (%sdriver %s)", ks->name, + rfkill_type_to_desc (rtype), ks->path, + ks->platform ? "platform " : "", ks->driver ? ks->driver : "<unknown>"); } |