blockdev-util: Add recursive lookup flag

Originating device lookups currently use separate entry points and
callers must decide between the single-step helper and manual looping.

Add a recursive flag to block_device_get_originating() and
block_get_originating(), and update callers to pass an explicit value.
This commit is contained in:
Chris Down
2026-01-23 13:26:08 +08:00
parent b61aeeb315
commit 7b8c4d01e6
8 changed files with 46 additions and 15 deletions
+1 -1
View File
@@ -678,7 +678,7 @@ static int get_sysext_overlay_block(const char *p, dev_t *ret) {
return 0;
}
(void) block_get_originating(*ret, ret);
(void) block_get_originating(*ret, ret, /* recursive= */ false);
return 1;
}