summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-28 20:03:56 +0200
committerLennart Poettering <lennart@poettering.net>2020-04-28 22:47:21 +0200
commit268f5a54630ef997d85f29a3ffc2b951f7a996c7 (patch)
treed5e9542deb01e2308ae95c75cb05945682aa64ef /src/resolve
parent76410e9849cf5f7d1914734589a356b0b8ed5f7c (diff)
downloadsystemd-268f5a54630ef997d85f29a3ffc2b951f7a996c7.tar.gz
tree-wide: support a bunch of additional specifiers
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-conf.c7
-rw-r--r--src/resolve/resolved-dnssd.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c
index ca5b8e7918..6ad66113e8 100644
--- a/src/resolve/resolved-conf.c
+++ b/src/resolve/resolved-conf.c
@@ -218,10 +218,15 @@ int config_parse_search_domains(
int config_parse_dnssd_service_name(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata) {
static const Specifier specifier_table[] = {
+ { 'm', specifier_machine_id, NULL },
{ 'b', specifier_boot_id, NULL },
{ 'H', specifier_host_name, NULL },
- { 'm', specifier_machine_id, 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 },
{}
};
DnssdService *s = userdata;
diff --git a/src/resolve/resolved-dnssd.c b/src/resolve/resolved-dnssd.c
index 0e6fa1d0c9..bc886fd0e0 100644
--- a/src/resolve/resolved-dnssd.c
+++ b/src/resolve/resolved-dnssd.c
@@ -153,10 +153,15 @@ static int specifier_dnssd_host_name(char specifier, const void *data, const voi
int dnssd_render_instance_name(DnssdService *s, char **ret_name) {
static const Specifier specifier_table[] = {
+ { 'm', specifier_machine_id, NULL },
{ 'b', specifier_boot_id, NULL },
{ 'H', specifier_dnssd_host_name, NULL },
- { 'm', specifier_machine_id, 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 },
{}
};
_cleanup_free_ char *name = NULL;