hotplug-dispatch: use stat if d_type is DT_UNKNOWN
authorJeffrey Bosboom <jbosboom@jeffreybosboom.com>
Sun, 14 Dec 2025 06:38:47 +0000 (22:38 -0800)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 9 Feb 2026 11:02:43 +0000 (11:02 +0000)
commitc4e9859876d5db7d8d69e8dc92bc7fde44ee96ec
treed8ec54fc599962c0a80fc730ff7100260bb826e8
parentbafdfff100d3bf1e91d35664b97cfd101d564416
hotplug-dispatch: use stat if d_type is DT_UNKNOWN

As documented in the readdir man page, support for d_type varies by
filesystem.  The ISO 9660 filesystem used in the x86 target's bootable
ISO images always sets d_type to DT_UNKNOWN.  Fall back to checking
S_ISDIR(st_mode) when d_type is DT_UNKNOWN.

Fixes: 08938fe ("procd: add hotplug-call dispatcher")
Signed-off-by: Jeffrey Bosboom <jbosboom@jeffreybosboom.com>
hotplug-dispatch.c