mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 18:20:22 +01:00
wifi: log ipw killswitch changes
This commit is contained in:
parent
df04e3f66c
commit
71bdbf9c25
1 changed files with 8 additions and 0 deletions
|
|
@ -269,6 +269,7 @@ nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self)
|
|||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
|
||||
char *contents = NULL;
|
||||
RfKillState state = RFKILL_UNBLOCKED;
|
||||
const char *str_state = NULL;
|
||||
|
||||
if ( priv->ipw_rfkill_path
|
||||
&& g_file_get_contents (priv->ipw_rfkill_path, &contents, NULL, NULL)) {
|
||||
|
|
@ -282,16 +283,23 @@ nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self)
|
|||
switch (contents[0]) {
|
||||
case '1':
|
||||
state = RFKILL_SOFT_BLOCKED;
|
||||
str_state = "soft-blocked";
|
||||
break;
|
||||
case '2':
|
||||
case '3':
|
||||
state = RFKILL_HARD_BLOCKED;
|
||||
str_state = "hard-blocked";
|
||||
break;
|
||||
case '0':
|
||||
str_state = "unblocked";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
g_free (contents);
|
||||
|
||||
nm_log_dbg (LOGD_RFKILL, "(%s): ipw rfkill state '%s'",
|
||||
nm_device_get_iface (NM_DEVICE (self)),
|
||||
str_state ? str_state : "(unknown)");
|
||||
}
|
||||
|
||||
return state;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue