hotplugd is the hardware hotplug mediation daemon for EriX.
- Rust 100%
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| linker.ld | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
hotplugd
hotplugd is the hardware hotplug mediation daemon for EriX.
It consumes kernel hotplug events through a dedicated kernel-control operation,
reports those events to deviced via typed IPC, and exposes deterministic
status/counter readback for orchestration checks. Driver lifecycle policy stays
in deviced.
Responsibilities
- Validate startup envelope and role contract (
SERVICE_ROLE_HOTPLUGD). - Register itself in
namedand resolvedevicedendpoint. - Read hotplug events using
WAIT_HOTPLUG_EVENTkernel control op. - Forward events to
deviced REPORT_HOTPLUG. - Expose deterministic event accounting through
DISCOVERandREAD_LAST_EVENT.
IPC Surface
hotplugd serves the following operations from lib-ipc:
IPC_PHASE2_HOTPLUGD_OP_DISCOVERIPC_PHASE2_HOTPLUGD_OP_READ_LAST_EVENT
hotplugd consumes:
IPC_KERNEL_CONTROL_OP_WAIT_HOTPLUG_EVENTIPC_PHASE2_DEVICED_OP_REPORT_HOTPLUGIPC_PHASE1_NAMED_OP_REGISTERIPC_PHASE1_NAMED_OP_LOOKUP
Runtime Behavior
DISCOVERconsumes up to caller-providedmax_events.- Each consumed event is synchronously reported to
deviced. - Event kinds are validated (
INSERTEDorREMOVED) before forwarding. READ_LAST_EVENTreturns last event metadata and cumulative counters.- Empty queue behavior is deterministic (
RETRY), not panic-based.
Build
cargo build --all-targets --all-features
Test
cargo test --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings
License
ISC.
Build and Test Modes
This repository supports additive runtime and integration feature gates.
*-runtimeand*-runtime-phase*features select production bootstrap/runtime behavior.*-integration-smokeremains available for synthetic end-to-end validation paths.*-integration-force-failremains test-only and MUST NOT be enabled for runtime appliance builds.
Compatibility aliases are kept so existing scenario feature names continue to compile while the runtime naming becomes canonical.