mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 14:40:33 +01:00
rfkill: fix the rfkill reason property query and parsing
The udev property is RFKILL_HW_BLOCK_REASON and it is returned as a
bitmap in hexadecimal.
Fixes: 9c4fbbe1b8 ('rfkill: query the hardware rfkill reason from udev')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1128
This commit is contained in:
parent
bd92d9df24
commit
237c028e53
1 changed files with 3 additions and 2 deletions
|
|
@ -211,9 +211,10 @@ recheck_killswitches(NMRfkillManager *self)
|
|||
G_MININT,
|
||||
G_MAXINT,
|
||||
-1);
|
||||
|
||||
sysfs_reason = _nm_utils_ascii_str_to_int64(
|
||||
udev_device_get_property_value(device, "RFKILL_STATE_REASON"),
|
||||
10,
|
||||
udev_device_get_property_value(device, "RFKILL_HW_BLOCK_REASON"),
|
||||
16,
|
||||
G_MININT,
|
||||
G_MAXINT,
|
||||
1); /* defaults to SIGNAL in case the kernel does not support this */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue