HomeFreeBSD

makefs: don't needlessly require directories to exist

Description

makefs: don't needlessly require directories to exist

If a type=dir entry exists and all contents are directories, files
added with contents=, or symlinks with link= attributes then it doesn't
need to exist. Just let openat fail in that case. It's conceivable
this will make debugging some cases weird, but it's sufficent to handle
the way we add /root/.ssh in CheriBSD VM images.

This is a recommit of 794154149f95d0cbc11aade166f9da919747e397 with
bugfixes.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38029

Details

Provenance
brooksAuthored on Jan 12 2023, 6:19 PM
Reviewer
markj
Differential Revision
D38029: makefs: don't needlessly require directories to exist
Parents
rG5e5baba880a2: Revert "makefs: don't needlessly require directories to exist"
Branches
Unknown
Tags
Unknown