fix(rfkill): accept events larger than v1 event size
Kernel 5.11 added one more field to the `struct rfkill_event` and broke unnecessarily strict check in `rfkill.cpp`. According to `linux/rfkill.h`, we must accept events at least as large as v1 event size and should be prepared to get additional fields at the end of a v1 event structure.
This commit is contained in:
parent
c5f875dc5f
commit
40f4dc9ecf
|
@ -61,7 +61,7 @@ void waybar::util::Rfkill::waitForEvent() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len != RFKILL_EVENT_SIZE_V1) {
|
if (len < RFKILL_EVENT_SIZE_V1) {
|
||||||
throw std::runtime_error("Wrong size of RFKILL event");
|
throw std::runtime_error("Wrong size of RFKILL event");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue