diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-25 15:09:17 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-25 15:12:27 +0900 |
commit | e93387f38b7782afb41b6b6256e6a0f635662e75 (patch) | |
tree | 45f9146a95a7e3e787f8c6418c7b97c76d647dfb /src/shared/specifier.h | |
parent | 55318801ba786199d2cbeb368054d1324926657a (diff) | |
download | systemd-e93387f38b7782afb41b6b6256e6a0f635662e75.tar.gz |
tree-wide: sort specifiers and move common comments to specifier.h
Diffstat (limited to 'src/shared/specifier.h')
-rw-r--r-- | src/shared/specifier.h | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/shared/specifier.h b/src/shared/specifier.h index e01ee67db3..1323b41d98 100644 --- a/src/shared/specifier.h +++ b/src/shared/specifier.h @@ -37,24 +37,48 @@ int specifier_tmp_dir(char specifier, const void *data, const void *userdata, ch int specifier_var_tmp_dir(char specifier, const void *data, const void *userdata, char **ret); /* Typically, in places where one of the above specifier is to be resolved the other similar ones are to be - * resolved, too. Hence let's define common macros for the relevant array entries. */ + * resolved, too. Hence let's define common macros for the relevant array entries. + * + * COMMON_SYSTEM_SPECIFIERS: + * %a: the native userspace architecture + * %b: the boot ID of the running system + * %B: the OS build ID, according to /etc/os-release + * %H: the hostname of the running system + * %l: the short hostname of the running system + * %m: the machine ID of the running system + * %o: the OS ID according to /etc/os-release + * %v: the kernel version + * %w: the OS version ID, according to /etc/os-release + * %W: the OS variant ID, according to /etc/os-release + * + * COMMON_CREDS_SPECIFIERS: + * %g: the groupname of the running user + * %G: the GID of the running user + * %u: the username of the running user + * %U: the UID of the running user + * + * COMMON_TMP_SPECIFIERS: + * %T: the temporary directory (e.g. /tmp, or $TMPDIR, $TEMP, $TMP) + * %V: the temporary directory for large, persistent stuff (e.g. /var/tmp, or $TMPDIR, $TEMP, $TMP) + */ + #define COMMON_SYSTEM_SPECIFIERS \ - { 'm', specifier_machine_id, NULL }, \ + { 'a', specifier_architecture, NULL }, \ { 'b', specifier_boot_id, NULL }, \ + { 'B', specifier_os_build_id, NULL }, \ { 'H', specifier_host_name, NULL }, \ { 'l', specifier_short_host_name, NULL }, \ - { 'v', specifier_kernel_release, NULL }, \ - { 'a', specifier_architecture, NULL }, \ + { 'm', specifier_machine_id, NULL }, \ { 'o', specifier_os_id, NULL }, \ + { 'v', specifier_kernel_release, NULL }, \ { 'w', specifier_os_version_id, NULL }, \ - { 'B', specifier_os_build_id, NULL }, \ { 'W', specifier_os_variant_id, NULL } #define COMMON_CREDS_SPECIFIERS \ { 'g', specifier_group_name, NULL }, \ { 'G', specifier_group_id, NULL }, \ - { 'U', specifier_user_id, NULL }, \ - { 'u', specifier_user_name, NULL } + { 'u', specifier_user_name, NULL }, \ + { 'U', specifier_user_id, NULL } #define COMMON_TMP_SPECIFIERS \ { 'T', specifier_tmp_dir, NULL }, \ |