platform: drop unused nm_platform_refresh_all()
The function is unused. It would require redesign to work with future changes, and since it's unused, just drop it. The long reasoning is: Currently, a refresh-all is tied to an NMPObjectType. However, with NMPObjectRoutingRule (for policy-routing-rules) that will no longer be the case. That is because NMPObjectRoutingRule will be one object type for AF_INET and AF_INET6. Contrary to IPv4 addresses and routes, where there are two sets of NMPObject types. The reason is, that it's preferable to treat IPv4 and IPv6 objects similarly, that is: as the same type with an address family property. That also follows netlink, which uses RTM_GET* messages for both address families, and the address family is expressed inside the message. But then an API like nm_platform_refresh_all() makes little sense, it would require at least an addr_family argument. But since the API is unused, just drop it.
This commit is contained in:
@@ -5896,12 +5896,6 @@ link_refresh (NMPlatform *platform, int ifindex)
|
||||
return !!nm_platform_link_get_obj (platform, ifindex, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
refresh_all (NMPlatform *platform, NMPObjectType obj_type)
|
||||
{
|
||||
do_request_one_type (platform, obj_type);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
link_set_netns (NMPlatform *platform,
|
||||
int ifindex,
|
||||
@@ -8462,7 +8456,6 @@ nm_linux_platform_class_init (NMLinuxPlatformClass *klass)
|
||||
platform_class->link_add = link_add;
|
||||
platform_class->link_delete = link_delete;
|
||||
|
||||
platform_class->refresh_all = refresh_all;
|
||||
platform_class->link_refresh = link_refresh;
|
||||
|
||||
platform_class->link_set_netns = link_set_netns;
|
||||
|
@@ -1188,21 +1188,6 @@ nm_platform_link_supports_slaves (NMPlatform *self, int ifindex)
|
||||
return (nm_platform_link_get_type (self, ifindex) & 0x20000);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_platform_refresh_all:
|
||||
* @self: platform instance
|
||||
* @obj_type: The object type to request.
|
||||
*
|
||||
* Resync and re-request all objects from kernel of a certain @obj_type.
|
||||
*/
|
||||
void
|
||||
nm_platform_refresh_all (NMPlatform *self, NMPObjectType obj_type)
|
||||
{
|
||||
_CHECK_SELF_VOID (self, klass);
|
||||
|
||||
klass->refresh_all (self, obj_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_platform_link_refresh:
|
||||
* @self: platform instance
|
||||
|
@@ -806,8 +806,6 @@ typedef struct {
|
||||
gboolean (*sysctl_set) (NMPlatform *, const char *pathid, int dirfd, const char *path, const char *value);
|
||||
char * (*sysctl_get) (NMPlatform *, const char *pathid, int dirfd, const char *path);
|
||||
|
||||
void (*refresh_all) (NMPlatform *self, NMPObjectType obj_type);
|
||||
|
||||
int (*link_add) (NMPlatform *,
|
||||
const char *name,
|
||||
NMLinkType type,
|
||||
@@ -1180,8 +1178,6 @@ gboolean nm_platform_sysctl_ip_conf_set_ipv6_hop_limit_safe (NMPlatform *self,
|
||||
const char *nm_platform_if_indextoname (NMPlatform *self, int ifindex, char *out_ifname/* of size IFNAMSIZ */);
|
||||
int nm_platform_if_nametoindex (NMPlatform *self, const char *ifname);
|
||||
|
||||
void nm_platform_refresh_all (NMPlatform *self, NMPObjectType obj_type);
|
||||
|
||||
const NMPObject *nm_platform_link_get_obj (NMPlatform *self,
|
||||
int ifindex,
|
||||
gboolean visible_only);
|
||||
|
Reference in New Issue
Block a user