From b18f40d974ffc33f3703d46bfe42d6fa2f844a01 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 27 May 2026 17:58:01 +0900 Subject: internal/kobject: pass action kind for range Useful for handling most uevents. Signed-off-by: Ophestra --- cmd/earlyinit/mount.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cmd/earlyinit/mount.go') diff --git a/cmd/earlyinit/mount.go b/cmd/earlyinit/mount.go index 6ac59a46..51d4ecc9 100644 --- a/cmd/earlyinit/mount.go +++ b/cmd/earlyinit/mount.go @@ -12,6 +12,7 @@ import ( "hakurei.app/check" "hakurei.app/fhs" "hakurei.app/internal/kobject" + "hakurei.app/internal/uevent" ) // mustMountSystem waits for and mounts a system device matching pattern. @@ -26,8 +27,9 @@ func mustMountSystem( for { var matchErr error var systemPath *check.Absolute - s.Range(c, func(o *kobject.Object) bool { - if o.Subsystem != "block" || + s.Range(c, func(o *kobject.Object, act uevent.KobjectAction) bool { + if (act != uevent.KOBJ_ADD && act != uevent.KOBJ_CHANGE) || + o.Subsystem != "block" || o.Env["DEVTYPE"] != "disk" { return true } -- cgit v1.3.1