]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
libsystemd-network: rename net_get_name() to net_get_name_persistent()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Jun 2019 11:38:40 +0000 (13:38 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Jun 2019 11:43:18 +0000 (13:43 +0200)
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
src/libsystemd-network/network-internal.c
src/libsystemd-network/network-internal.h

index 0c1ff34e5de339b22de17c1381fa0fa5ccee5293..c01c1cf6d6f50b5177ccfe65b175896075e8c020 100644 (file)
@@ -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);
                 }
         }
 
index a112b9f70f98660a8234f165c9b29ef1e4d30202..1a588f10d366557491e984dce4243ad77fcd5ff9 100644 (file)
@@ -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)
index 62f5a4a76c5ab3154a485f8b495a0ced30aedeea..bb2bd8b35b17eece3e37d53f74a0645d38cc2473 100644 (file)
@@ -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,