diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-10-16 22:39:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-01-17 09:42:16 +0100 |
commit | 0ba07f907721941f611eaca9521937c467bdfff2 (patch) | |
tree | 91d5502d529ca1e7650c7c797476d8cb071ceebd /src/shared/generator.h | |
parent | units: measure /etc/machine-id into PCR 15 during early boot (diff) | |
download | systemd-0ba07f907721941f611eaca9521937c467bdfff2.tar.xz systemd-0ba07f907721941f611eaca9521937c467bdfff2.zip |
generator: teach generator_add_symlink() to instantiate specified unit
if we want generators to instantiate a template service, we need to
teach generator_add_symlink() the concept.
Just some preparation for a later commit.
While we are at it, modernize the function around
path_extract_filename() + path_extract_directory()
Diffstat (limited to 'src/shared/generator.h')
-rw-r--r-- | src/shared/generator.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/generator.h b/src/shared/generator.h index 1b4f36ac53..a4049dbd8f 100644 --- a/src/shared/generator.h +++ b/src/shared/generator.h @@ -12,7 +12,11 @@ int generator_open_unit_file( const char *name, FILE **file); -int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src); +int generator_add_symlink_full(const char *dir, const char *dst, const char *dep_type, const char *src, const char *instance); + +static inline int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src) { + return generator_add_symlink_full(dir, dst, dep_type, src, NULL); +} int generator_write_fsck_deps( FILE *f, |