mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
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.)
This commit is contained in:
parent
2ebe027b44
commit
b889a0ded8
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user