conf-files: add flag so that we don't always prefix returned paths with the root dir path used

This is useful in tools such as system-repart where we show the
definition file paths a lot in our output, but if prefixed with the root
path we'd show a temporary mount dir when operating on a image file.
Hence, let's drop the prefix here, and show only the path within the
image.
This commit is contained in:
Lennart Poettering
2026-01-25 20:51:50 +01:00
parent 8a4f856977
commit 65a6da9c96
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -3397,7 +3397,7 @@ static int context_read_definitions(Context *context) {
&files,
".conf",
context->definitions ? NULL : arg_root,
CONF_FILES_REGULAR|CONF_FILES_FILTER_MASKED|CONF_FILES_WARN,
CONF_FILES_REGULAR|CONF_FILES_FILTER_MASKED|CONF_FILES_WARN|CONF_FILES_DONT_PREFIX_ROOT,
dirs);
if (r < 0)
return log_error_errno(r, "Failed to enumerate *.conf files: %m");