From b889a0ded8ef41e19ea0e64d0afa657e864134ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 17 Jun 2019 13:38:40 +0200 Subject: [PATCH] libsystemd-network: rename net_get_name() to net_get_name_persistent() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reflect its role better. (I didn't use …_persistent_name(), because which name is actually used depends on the policy. So it's better not to make this sound like it returns *the* persistent name.) --- src/libsystemd-network/dhcp-identifier.c | 2 +- src/libsystemd-network/network-internal.c | 8 ++++---- src/libsystemd-network/network-internal.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsystemd-network/dhcp-identifier.c b/src/libsystemd-network/dhcp-identifier.c index 0c1ff34e5d..c01c1cf6d6 100644 --- a/src/libsystemd-network/dhcp-identifier.c +++ b/src/libsystemd-network/dhcp-identifier.c @@ -190,7 +190,7 @@ int dhcp_identifier_set_iaid( /* device is under renaming */ return -EBUSY; - name = net_get_name(device); + name = net_get_name_persistent(device); } } diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c index a112b9f70f..1a588f10d3 100644 --- a/src/libsystemd-network/network-internal.c +++ b/src/libsystemd-network/network-internal.c @@ -24,7 +24,7 @@ #include "utf8.h" #include "util.h" -const char *net_get_name(sd_device *device) { +const char *net_get_name_persistent(sd_device *device) { const char *name, *field; assert(device); @@ -47,9 +47,9 @@ int net_get_unique_predictable_data(sd_device *device, uint64_t *result) { assert(device); - /* net_get_name() will return one of the device names based on stable information about the - * device. If this is not available, we fall back to using the device name. */ - name = net_get_name(device); + /* net_get_name_persistent() will return one of the device names based on stable information about + * the device. If this is not available, we fall back to using the actual device name. */ + name = net_get_name_persistent(device); if (!name) (void) sd_device_get_sysname(device, &name); if (!name) diff --git a/src/libsystemd-network/network-internal.h b/src/libsystemd-network/network-internal.h index 62f5a4a76c..bb2bd8b35b 100644 --- a/src/libsystemd-network/network-internal.h +++ b/src/libsystemd-network/network-internal.h @@ -33,7 +33,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_ifalias); CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority); int net_get_unique_predictable_data(sd_device *device, uint64_t *result); -const char *net_get_name(sd_device *device); +const char *net_get_name_persistent(sd_device *device); size_t serialize_in_addrs(FILE *f, const struct in_addr *addresses, -- 2.25.1