sysupdate: some smaller clean-ups
Nothing earth shattering, just some minor tweaks.
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
#include "shared-forward.h" /* IWYU pragma: export */
|
||||
|
||||
typedef struct Context Context;
|
||||
typedef struct PartitionInfo PartitionInfo;
|
||||
typedef struct Resource Resource;
|
||||
typedef struct Instance Instance;
|
||||
typedef struct InstanceMetadata InstanceMetadata;
|
||||
typedef struct PartitionInfo PartitionInfo;
|
||||
typedef struct Resource Resource;
|
||||
typedef struct Transfer Transfer;
|
||||
typedef struct UpdateSet UpdateSet;
|
||||
|
||||
@@ -458,7 +458,7 @@ int pattern_match_many(char **patterns, const char *s, InstanceMetadata *ret) {
|
||||
r = pattern_match(*p, s, &found);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r > 0) {
|
||||
if (r != PATTERN_MATCH_NO) {
|
||||
if (ret) {
|
||||
*ret = found;
|
||||
found = (InstanceMetadata) INSTANCE_METADATA_NULL;
|
||||
|
||||
@@ -158,6 +158,8 @@ static int resource_load_from_directory_recursive(
|
||||
return log_oom();
|
||||
|
||||
r = pattern_match_many(rr->patterns, rel_joined_for_matching, &extracted_fields);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to match pattern: %m");
|
||||
if (r == PATTERN_MATCH_RETRY) {
|
||||
_cleanup_closedir_ DIR *subdir = NULL;
|
||||
|
||||
@@ -170,10 +172,7 @@ static int resource_load_from_directory_recursive(
|
||||
return r;
|
||||
if (r == 0)
|
||||
continue;
|
||||
}
|
||||
else if (r < 0)
|
||||
return log_error_errno(r, "Failed to match pattern: %m");
|
||||
else if (r == PATTERN_MATCH_NO)
|
||||
} else if (r == PATTERN_MATCH_NO)
|
||||
continue;
|
||||
|
||||
if (de->d_type == DT_DIR && m != S_IFDIR)
|
||||
|
||||
Reference in New Issue
Block a user