From: Zbigniew Jędrzejewski-Szmek Date: Mon, 17 Jun 2019 11:38:40 +0000 (+0200) Subject: libsystemd-network: rename net_get_name() to net_get_name_persistent() X-Git-Tag: v243-rc1~275^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b889a0ded8ef41e19ea0e64d0afa657e864134ed;p=thirdparty%2Fsystemd.git libsystemd-network: rename net_get_name() to net_get_name_persistent() 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.) --- diff --git a/src/libsystemd-network/dhcp-identifier.c b/src/libsystemd-network/dhcp-identifier.c index 0c1ff34e5de..c01c1cf6d6f 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 a112b9f70f9..1a588f10d36 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 62f5a4a76c5..bb2bd8b35b1 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,