diff options
| author | Felix Fietkau | 2025-08-07 11:27:50 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2025-08-07 13:44:21 +0000 |
| commit | 46780098002167070c665f03f1a8ed76d1e1c55f (patch) | |
| tree | dd724791d5d1fdcb7c226237e140a48915f7d890 | |
| parent | 4d023b8a8c510d5e8b4c616fb0ba4561d472587c (diff) | |
| download | procd-46780098002167070c665f03f1a8ed76d1e1c55f.tar.gz | |
hotplug: ensure that the button subsystem is always registered
Its events are handled separately, so there usually is no hotplug.d directory
for it.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | hotplug-dispatch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hotplug-dispatch.c b/hotplug-dispatch.c index 6e99942..fd87a09 100644 --- a/hotplug-dispatch.c +++ b/hotplug-dispatch.c @@ -375,6 +375,9 @@ static void remove_subsystem(char *name) { struct hotplug_subsys *h; + if (!strcmp(name, "button")) + return; + h = avl_find_element(&subsystems, name, h, node); if (!h) return; @@ -388,6 +391,8 @@ static int init_subsystems(void) DIR *dir; struct dirent *dirent; + add_subsystem("button"); + dir = opendir(HOTPLUG_BASEDIR); if (dir == NULL) return ENOENT; |