shared: add root argument to search_and_fopen

This adds the same root argument to search_and_fopen that
conf_files_list already has. Tools that use those two functions as a
pair can now be easily modified to load configuration files from an
alternate root filesystem tree.
This commit is contained in:
Michael Marineau
2014-03-14 09:31:34 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 315db1a8ae
commit 4cf7ea556a
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent
assert(ctx);
assert(path);
r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f);
r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f);
if (r < 0) {
if (ignore_enoent && r == -ENOENT)
return 0;