conf-files: add support for root_fd based operation

Let's make sure we can safely load configuration files based on a root
fd, including XAT_FDROOT.

(While we are at it, always pass path to root fs before fd to root fs,
following our recently updated CODING_STYLE)
This commit is contained in:
Lennart Poettering
2026-01-25 20:51:50 +01:00
parent 17ade5b2af
commit 6ecfa12af0
19 changed files with 249 additions and 100 deletions
+9 -7
View File
@@ -460,13 +460,15 @@ static int context_load_install_conf(Context *c) {
assert(c);
r = load_kernel_install_conf(arg_root,
c->conf_root,
&machine_id,
&boot_root,
&layout,
&initrd_generator,
&uki_generator);
r = load_kernel_install_conf_at(
c->conf_root ? NULL : arg_root,
c->conf_root ? XAT_FDROOT : c->rfd,
c->conf_root,
&machine_id,
&boot_root,
&layout,
&initrd_generator,
&uki_generator);
if (r <= 0)
return r;