Commit 8f458aa
authored
fix: refined swhks ipc.rs for hash calculation and finding buffer byte (#306)
* fix: unblock all rfkill softblocks to avoid radio devs turning off
This commit attempts at fixing the major issue of rfkill not being
properly turned off while creating the swhkd virtual device.
Changes made:
1. Added RfkillEvent struct that stores the rfkill details and status
required with documentation
2. Added two new macros with `ioctl_readwrite` to ensure that we can
query the rfkill status and modify properly
3. New function `unblock_rfkill` that unblocks all soft blocks for any
device
4. Called `unblock_rfkill` function in `create_uinput_switches_device`
that ensures that rfkill is NOT blocked and complies with rfkill-input
being disabled
This should ensure that rfkill does not react when virtual device is
being created.
* fix: clean up code in swhks ipc.rs
1. Calculate hash function now borrows the string instead of taking
ownership
2. Used match to check for buffer byte instead of if statement
3. Added more debug logging and error handling
* chore: fallback commit to parent ca82393
Remove updated logic for uinput.rs as it does not work
* fix: use is_some_and instead of map_for in daemon.rs
replaced `map_for` with `is_some_and` as it is more efficient in this
case (simple bool ops)1 parent e972f55 commit 8f458aa
2 files changed
+51
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 37 | + | |
| 38 | + | |
46 | 39 | | |
47 | 40 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
58 | 53 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
63 | 87 | | |
64 | 88 | | |
65 | 89 | | |
66 | | - | |
| 90 | + | |
67 | 91 | | |
68 | 92 | | |
69 | 93 | | |
| |||
0 commit comments