mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 19:20:12 +01:00
device-factory/trivial: rename get_virtual_iface_name() to get_connection_iface()
This commit is contained in:
parent
8c1a9bbb8c
commit
fd314ed7f7
8 changed files with 42 additions and 42 deletions
|
|
@ -158,9 +158,9 @@ nm_device_factory_get_connection_parent (NMDeviceFactory *factory,
|
|||
}
|
||||
|
||||
static char *
|
||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
{
|
||||
const char *iface;
|
||||
|
||||
|
|
@ -173,10 +173,10 @@ get_virtual_iface_name (NMDeviceFactory *factory,
|
|||
}
|
||||
|
||||
char *
|
||||
nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface,
|
||||
GError **error)
|
||||
nm_device_factory_get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface,
|
||||
GError **error)
|
||||
{
|
||||
char *ifname;
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_virtual_iface_name) {
|
||||
if (!NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_connection_iface) {
|
||||
g_set_error (error,
|
||||
NM_MANAGER_ERROR,
|
||||
NM_MANAGER_ERROR_FAILED,
|
||||
|
|
@ -202,7 +202,7 @@ nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ifname = NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_virtual_iface_name (factory, connection, parent_iface);
|
||||
ifname = NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_connection_iface (factory, connection, parent_iface);
|
||||
if (!ifname) {
|
||||
g_set_error (error,
|
||||
NM_MANAGER_ERROR,
|
||||
|
|
@ -230,7 +230,7 @@ nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
|||
static void
|
||||
nm_device_factory_default_init (NMDeviceFactoryInterface *factory_iface)
|
||||
{
|
||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
||||
factory_iface->get_connection_iface = get_connection_iface;
|
||||
|
||||
/* Signals */
|
||||
signals[DEVICE_ADDED] = g_signal_new (NM_DEVICE_FACTORY_DEVICE_ADDED,
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ typedef struct {
|
|||
NMConnection *connection);
|
||||
|
||||
/**
|
||||
* get_virtual_iface_name:
|
||||
* get_connection_iface:
|
||||
* @factory: the #NMDeviceFactory
|
||||
* @connection: the #NMConnection to return the virtual interface name for
|
||||
* @parent_iface: parent interface name
|
||||
|
|
@ -111,9 +111,9 @@ typedef struct {
|
|||
*
|
||||
* Returns: the interface name, or %NULL
|
||||
*/
|
||||
char * (*get_virtual_iface_name) (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface);
|
||||
char * (*get_connection_iface) (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface);
|
||||
|
||||
/**
|
||||
* create_device:
|
||||
|
|
@ -175,10 +175,10 @@ void nm_device_factory_get_supported_types (NMDeviceFactory *factory,
|
|||
const char *nm_device_factory_get_connection_parent (NMDeviceFactory *factory,
|
||||
NMConnection *connection);
|
||||
|
||||
char * nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface,
|
||||
GError **error);
|
||||
char * nm_device_factory_get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface,
|
||||
GError **error);
|
||||
|
||||
void nm_device_factory_start (NMDeviceFactory *factory);
|
||||
|
||||
|
|
|
|||
|
|
@ -399,9 +399,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
|||
}
|
||||
|
||||
static char *
|
||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
{
|
||||
NMSettingInfiniband *s_infiniband;
|
||||
|
||||
|
|
@ -423,6 +423,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (INFINIBAND, Infiniband, infiniband,
|
|||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_INFINIBAND_SETTING_NAME),
|
||||
factory_iface->create_device = create_device;
|
||||
factory_iface->get_connection_parent = get_connection_parent;
|
||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
||||
factory_iface->get_connection_iface = get_connection_iface;
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1023,9 +1023,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
|||
}
|
||||
|
||||
static char *
|
||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
{
|
||||
const char *ifname;
|
||||
NMSettingIPTunnel *s_ip_tunnel;
|
||||
|
|
@ -1048,5 +1048,5 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (IP_TUNNEL, IPTunnel, ip_tunnel,
|
|||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_IP_TUNNEL_SETTING_NAME),
|
||||
factory_iface->create_device = create_device;
|
||||
factory_iface->get_connection_parent = get_connection_parent;
|
||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
||||
factory_iface->get_connection_iface = get_connection_iface;
|
||||
)
|
||||
|
|
|
|||
|
|
@ -744,9 +744,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
|||
}
|
||||
|
||||
static char *
|
||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
{
|
||||
NMSettingMacvlan *s_macvlan;
|
||||
const char *ifname;
|
||||
|
|
@ -768,6 +768,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (MACVLAN, Macvlan, macvlan,
|
|||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_MACVLAN_SETTING_NAME),
|
||||
factory_iface->create_device = create_device;
|
||||
factory_iface->get_connection_parent = get_connection_parent;
|
||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
||||
factory_iface->get_connection_iface = get_connection_iface;
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -758,9 +758,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
|||
}
|
||||
|
||||
static char *
|
||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
{
|
||||
const char *ifname;
|
||||
NMSettingVlan *s_vlan;
|
||||
|
|
@ -789,6 +789,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (VLAN, Vlan, vlan,
|
|||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_VLAN_SETTING_NAME),
|
||||
factory_iface->create_device = create_device;
|
||||
factory_iface->get_connection_parent = get_connection_parent;
|
||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
||||
factory_iface->get_connection_iface = get_connection_iface;
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -810,9 +810,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
|||
}
|
||||
|
||||
static char *
|
||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
get_connection_iface (NMDeviceFactory *factory,
|
||||
NMConnection *connection,
|
||||
const char *parent_iface)
|
||||
{
|
||||
const char *ifname;
|
||||
NMSettingVxlan *s_vxlan;
|
||||
|
|
@ -834,6 +834,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (VXLAN, Vxlan, vxlan,
|
|||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_VXLAN_SETTING_NAME),
|
||||
factory_iface->create_device = create_device;
|
||||
factory_iface->get_connection_parent = get_connection_parent;
|
||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
||||
factory_iface->get_connection_iface = get_connection_iface;
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -985,10 +985,10 @@ get_virtual_iface_name (NMManager *self,
|
|||
}
|
||||
|
||||
parent = find_parent_device_for_connection (self, connection);
|
||||
iface = nm_device_factory_get_virtual_iface_name (factory,
|
||||
connection,
|
||||
parent ? nm_device_get_ip_iface (parent) : NULL,
|
||||
error);
|
||||
iface = nm_device_factory_get_connection_iface (factory,
|
||||
connection,
|
||||
parent ? nm_device_get_ip_iface (parent) : NULL,
|
||||
error);
|
||||
if (!iface)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue