aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/uevent/uevent.go
AgeCommit message (Collapse)Author
2026-04-06internal/uevent: optionally pass UUID during coldbootOphestra
This enables rejection of non-coldboot synthetic events. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-31internal/uevent: integrate error handling in event loopOphestra
There are many subtleties when recovering from errors in the event loop, and coldboot requires internals to drain the receive buffer as synthetic uevents are being arranged. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30internal/uevent: separate recvmsg helperOphestra
This enables messages to be received separately. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30internal/netlink: set receive buffer sizeOphestra
This is done by both systemd sd-device and AOSP ueventd to improve robustness. Rosa OS will still handle ENOBUFS via coldboot but a big buffer should mitigate this as well. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30internal/uevent: handle state divergenceOphestra
This requires the caller to arrange for a coldboot to happen, some time after this error is encountered, and to resume event processing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-29internal/netlink: switch to recvmsg/sendmsgOphestra
These are more flexible than recvfrom/sendto. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-28internal/uevent: consume kernel-originated eventsOphestra
These are not possible to cover outside integration vm. Extreme care is required when dealing with this method, so keep it simple. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-28internal/uevent: exclusive socket accessOphestra
This is a much simplified mutex, since blocking is not required. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-28internal/uevent: nontrivial errorsOphestra
These errors are best represented as JSON. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-27internal/uevent: recoverable errorsOphestra
This runs in the Rosa OS init, so recover as much as possible, as otherwise it is likely to require a full system reboot to resume event processing. The caller is responsible for reporting the error. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-27internal/uevent: wrap netlink socketOphestra
Unfortunately these messages do not have the same format as rtnetlink. Signed-off-by: Ophestra <cat@gensokyo.uk>