conf-files: make conf_file_new() take ConfFilesFlags rather than ChaseFlags
No functional change, preparation for later commit.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "chase.h"
|
||||
#include "conf-files.h"
|
||||
#include "fd-util.h"
|
||||
#include "fuzz.h"
|
||||
@@ -29,7 +28,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
assert_se(rules = udev_rules_new(RESOLVE_NAME_EARLY));
|
||||
|
||||
_cleanup_(conf_file_freep) ConfFile *c = NULL;
|
||||
ASSERT_OK(conf_file_new(filename, /* root= */ NULL, CHASE_MUST_BE_REGULAR, &c));
|
||||
ASSERT_OK(conf_file_new(filename, /* root= */ NULL, CONF_FILES_REGULAR, &c));
|
||||
|
||||
r = udev_rules_parse_file(rules, c, /* extra_checks= */ false, /* ret= */ NULL);
|
||||
log_info_errno(r, "Parsing %s: %m", filename);
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "alloc-util.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "chase.h"
|
||||
#include "conf-files.h"
|
||||
#include "constants.h"
|
||||
#include "device-private.h"
|
||||
@@ -249,7 +248,7 @@ static int search_rules_file_in_conf_dirs(const char *s, const char *root, ConfF
|
||||
return log_oom();
|
||||
|
||||
_cleanup_(conf_file_freep) ConfFile *c = NULL;
|
||||
r = conf_file_new(path, root, CHASE_MUST_BE_REGULAR, &c);
|
||||
r = conf_file_new(path, root, CONF_FILES_REGULAR, &c);
|
||||
if (r == -ENOENT)
|
||||
continue;
|
||||
if (r < 0)
|
||||
@@ -279,7 +278,7 @@ static int search_rules_file(const char *s, const char *root, ConfFile ***files,
|
||||
|
||||
/* If not found, or if it is a path, then chase it. */
|
||||
_cleanup_(conf_file_freep) ConfFile *c = NULL;
|
||||
r = conf_file_new(s, root, CHASE_MUST_BE_REGULAR, &c);
|
||||
r = conf_file_new(s, root, CONF_FILES_REGULAR, &c);
|
||||
if (r >= 0) {
|
||||
if (!GREEDY_REALLOC_APPEND(*files, *n_files, &c, 1))
|
||||
return log_oom();
|
||||
|
||||
Reference in New Issue
Block a user