summaryrefslogtreecommitdiff
path: root/src/shared/specifier.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-05-26 17:08:38 +0200
committerLennart Poettering <lennart@poettering.net>2021-05-26 17:20:36 +0200
commit2caed041c0b04a993d11d8cf4174a617bf3cf40b (patch)
tree371220b377ed3ac209f3bd19edab25b08a4eaf83 /src/shared/specifier.h
parent3dfeb0449189c6610fa46342389fdf434483b87e (diff)
downloadsystemd-2caed041c0b04a993d11d8cf4174a617bf3cf40b.tar.gz
sysusers: add a generic specifier table for common cases
This moves the definition of the specifier table consisting only of system and /tmp specifiers into generic code so that we can share it. This patch only adds one user of it for now. Follow-up patches will add more.
Diffstat (limited to 'src/shared/specifier.h')
-rw-r--r--src/shared/specifier.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/specifier.h b/src/shared/specifier.h
index 0c5bb3d0c4..839515da42 100644
--- a/src/shared/specifier.h
+++ b/src/shared/specifier.h
@@ -80,7 +80,6 @@ int specifier_var_tmp_dir(char specifier, const void *data, const void *userdata
{ 'w', specifier_os_version_id, NULL }, \
{ 'W', specifier_os_variant_id, NULL }
-
#define COMMON_CREDS_SPECIFIERS \
{ 'g', specifier_group_name, NULL }, \
{ 'G', specifier_group_id, NULL }, \
@@ -96,3 +95,6 @@ static inline char* specifier_escape(const char *string) {
}
int specifier_escape_strv(char **l, char ***ret);
+
+/* A generic specifier table consisting of COMMON_SYSTEM_SPECIFIERS and COMMON_TMP_SPECIFIERS */
+extern const Specifier system_and_tmp_specifier_table[];