mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
`MatchPattern` for regular-file and directory as target can now match subdirectories This is useful to install files for examples in `.extra.d` directories: ``` [Target] Type=regular-file Path=/EFI/Linux PathRelativeTo=boot MatchPattern=gnomeos_@v.efi.extra.d/apparmor.addon.efi ``` The if the directories in the path do not exist, they will be created. Whereas the part in `Path` is not created.
19 lines
516 B
C
19 lines
516 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "sysupdate-instance.h"
|
|
#include "time-util.h"
|
|
|
|
enum {
|
|
PATTERN_MATCH_NO,
|
|
PATTERN_MATCH_YES,
|
|
PATTERN_MATCH_RETRY,
|
|
};
|
|
|
|
int pattern_match(const char *pattern, const char *s, InstanceMetadata *ret);
|
|
int pattern_match_many(char **patterns, const char *s, InstanceMetadata *ret);
|
|
int pattern_valid(const char *pattern);
|
|
int pattern_format(const char *pattern, const InstanceMetadata *fields, char **ret);
|