core: abstract out the duplicated default-ifname-generating code

NMDeviceBond, NMDeviceBridge, and NMDeviceTeam all used basically the
same code to generate a default interface name. Move it into
nm_utils_complete_generic().
This commit is contained in:
Dan Winship
2014-08-05 17:11:57 -04:00
parent 6217c1e74c
commit 7d233cc956
15 changed files with 69 additions and 115 deletions

View File

@@ -102,8 +102,9 @@ const char *nm_utils_get_ip_config_method (NMConnection *connection,
void nm_utils_complete_generic (NMConnection *connection,
const char *ctype,
const GSList *existing,
const char *preferred,
const char *fallback_prefix,
const char *preferred_id,
const char *fallback_id_prefix,
const char *ifname_prefix,
gboolean default_enable_ipv6);
char *nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id);