mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 12:40:36 +01:00
platform: move nm_platform_link_duplex_type_to_string() to "nm-platform-utils.c"
There should be a clear hierarchie of dependency. That is, "nm-platform.h" may use "nm-platform-utils.h", but not the other way around. Move nm_platform_link_duplex_type_to_string().
This commit is contained in:
parent
84d67d3a4f
commit
90881953ed
4 changed files with 11 additions and 9 deletions
|
|
@ -53,6 +53,15 @@ nmp_utils_if_nametoindex(const char *ifname)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NM_UTILS_LOOKUP_STR_DEFINE(nm_platform_link_duplex_type_to_string,
|
||||
NMPlatformLinkDuplexType,
|
||||
NM_UTILS_LOOKUP_DEFAULT_WARN(NULL),
|
||||
NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_UNKNOWN, "unknown"),
|
||||
NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_FULL, "full"),
|
||||
NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_HALF, "half"), );
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
const int ifindex;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ gboolean nmp_utils_ethtool_set_wake_on_lan(int ifindex,
|
|||
_NMSettingWiredWakeOnLan wol,
|
||||
const char * wol_password);
|
||||
|
||||
const char *nm_platform_link_duplex_type_to_string(NMPlatformLinkDuplexType duplex);
|
||||
|
||||
gboolean nmp_utils_ethtool_get_link_settings(int ifindex,
|
||||
gboolean * out_autoneg,
|
||||
guint32 * out_speed,
|
||||
|
|
|
|||
|
|
@ -3322,13 +3322,6 @@ nm_platform_ethtool_get_link_settings(NMPlatform * self,
|
|||
return nmp_utils_ethtool_get_link_settings(ifindex, out_autoneg, out_speed, out_duplex);
|
||||
}
|
||||
|
||||
NM_UTILS_LOOKUP_STR_DEFINE(nm_platform_link_duplex_type_to_string,
|
||||
NMPlatformLinkDuplexType,
|
||||
NM_UTILS_LOOKUP_DEFAULT_WARN(NULL),
|
||||
NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_UNKNOWN, "unknown"),
|
||||
NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_FULL, "full"),
|
||||
NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_HALF, "half"), );
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMEthtoolFeatureStates *
|
||||
|
|
|
|||
|
|
@ -2358,8 +2358,6 @@ gboolean nm_platform_ethtool_get_link_ring(NMPlatform *self, int ifindex, NMEtht
|
|||
gboolean
|
||||
nm_platform_ethtool_set_ring(NMPlatform *self, int ifindex, const NMEthtoolRingState *ring);
|
||||
|
||||
const char *nm_platform_link_duplex_type_to_string(NMPlatformLinkDuplexType duplex);
|
||||
|
||||
void nm_platform_ip4_dev_route_blacklist_set(NMPlatform *self,
|
||||
int ifindex,
|
||||
GPtrArray * ip4_dev_route_blacklist);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue