summaryrefslogtreecommitdiff
path: root/src/test/test-strv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-11-20 15:15:24 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-11-25 14:13:02 +0900
commit2824aa0796abbba718505bd5d4132dc6a6e179e8 (patch)
tree170f362b239c2011327d00f41621e1e9d0d40ec9 /src/test/test-strv.c
parentff84fadbf1466c5cd1da50394aba6ad3d3c3614c (diff)
downloadsystemd-2824aa0796abbba718505bd5d4132dc6a6e179e8.tar.gz
specifiers: introduce common macros for generating specifier tables
In many cases the tables are largely the same, hence define a common set of macros to generate the common parts. This adds in a couple of missing specifiers here and there, so is more thant just refactoring: it actually fixes accidental omissions. Note that some entries that look like they could be unified under these macros can't really be unified, since they are slightly different. For example in the DNSSD service logic we want to use the DNSSD hostname for %H rather than the unmodified kernel one.
Diffstat (limited to 'src/test/test-strv.c')
-rw-r--r--src/test/test-strv.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/test/test-strv.c b/src/test/test-strv.c
index 0c46af05cc..6b5005f9fc 100644
--- a/src/test/test-strv.c
+++ b/src/test/test-strv.c
@@ -11,15 +11,7 @@ static void test_specifier_printf(void) {
static const Specifier table[] = {
{ 'X', specifier_string, (char*) "AAAA" },
{ 'Y', specifier_string, (char*) "BBBB" },
- { 'm', specifier_machine_id, NULL },
- { 'b', specifier_boot_id, NULL },
- { 'H', specifier_host_name, NULL },
- { 'v', specifier_kernel_release, NULL },
- { 'a', specifier_architecture, NULL },
- { 'o', specifier_os_id, NULL },
- { 'w', specifier_os_version_id, NULL },
- { 'B', specifier_os_build_id, NULL },
- { 'W', specifier_os_variant_id, NULL },
+ COMMON_SYSTEM_SPECIFIERS,
{}
};