summaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-12-09 17:33:30 +0100
committerThomas Haller <thaller@redhat.com>2015-12-10 14:33:49 +0100
commit9166ee6958efc7a751fdad3833db55d8104af6b6 (patch)
treebeb580286a24199845596f3cc977095709f72544 /src/platform
parenteef388990f134fd30045807860055ef22afbbd5c (diff)
downloadNetworkManager-9166ee6958efc7a751fdad3833db55d8104af6b6.tar.gz
platform/trivial: rename sysctl slave/master option functions
These function purely operate on sysctl by reading/writing to file. Rename them to reflect that they are not related to netlink parts of platform.
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/nm-platform.c8
-rw-r--r--src/platform/nm-platform.h8
-rw-r--r--src/platform/tests/test-link.c12
3 files changed, 14 insertions, 14 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c
index 46cc505404..82568fc32a 100644
--- a/src/platform/nm-platform.c
+++ b/src/platform/nm-platform.c
@@ -1637,7 +1637,7 @@ nm_platform_link_tun_add (NMPlatform *self,
}
gboolean
-nm_platform_master_set_option (NMPlatform *self, int ifindex, const char *option, const char *value)
+nm_platform_sysctl_master_set_option (NMPlatform *self, int ifindex, const char *option, const char *value)
{
_CHECK_SELF (self, klass, FALSE);
@@ -1650,7 +1650,7 @@ nm_platform_master_set_option (NMPlatform *self, int ifindex, const char *option
}
char *
-nm_platform_master_get_option (NMPlatform *self, int ifindex, const char *option)
+nm_platform_sysctl_master_get_option (NMPlatform *self, int ifindex, const char *option)
{
_CHECK_SELF (self, klass, NULL);
@@ -1662,7 +1662,7 @@ nm_platform_master_get_option (NMPlatform *self, int ifindex, const char *option
}
gboolean
-nm_platform_slave_set_option (NMPlatform *self, int ifindex, const char *option, const char *value)
+nm_platform_sysctl_slave_set_option (NMPlatform *self, int ifindex, const char *option, const char *value)
{
_CHECK_SELF (self, klass, FALSE);
@@ -1675,7 +1675,7 @@ nm_platform_slave_set_option (NMPlatform *self, int ifindex, const char *option,
}
char *
-nm_platform_slave_get_option (NMPlatform *self, int ifindex, const char *option)
+nm_platform_sysctl_slave_get_option (NMPlatform *self, int ifindex, const char *option)
{
_CHECK_SELF (self, klass, NULL);
diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h
index 5d9b31bf84..1913b9c54b 100644
--- a/src/platform/nm-platform.h
+++ b/src/platform/nm-platform.h
@@ -757,10 +757,10 @@ gboolean nm_platform_link_supports_vlans (NMPlatform *self, int ifindex);
gboolean nm_platform_link_enslave (NMPlatform *self, int master, int slave);
gboolean nm_platform_link_release (NMPlatform *self, int master, int slave);
-gboolean nm_platform_master_set_option (NMPlatform *self, int ifindex, const char *option, const char *value);
-char *nm_platform_master_get_option (NMPlatform *self, int ifindex, const char *option);
-gboolean nm_platform_slave_set_option (NMPlatform *self, int ifindex, const char *option, const char *value);
-char *nm_platform_slave_get_option (NMPlatform *self, int ifindex, const char *option);
+gboolean nm_platform_sysctl_master_set_option (NMPlatform *self, int ifindex, const char *option, const char *value);
+char *nm_platform_sysctl_master_get_option (NMPlatform *self, int ifindex, const char *option);
+gboolean nm_platform_sysctl_slave_set_option (NMPlatform *self, int ifindex, const char *option, const char *value);
+char *nm_platform_sysctl_slave_get_option (NMPlatform *self, int ifindex, const char *option);
const NMPObject *nm_platform_link_get_lnk (NMPlatform *self, int ifindex, NMLinkType link_type, const NMPlatformLink **out_link);
const NMPlatformLnkGre *nm_platform_link_get_lnk_gre (NMPlatform *self, int ifindex, const NMPlatformLink **out_link);
diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c
index 0cee24cd8d..3446983b68 100644
--- a/src/platform/tests/test-link.c
+++ b/src/platform/tests/test-link.c
@@ -274,8 +274,8 @@ test_slave (int master, int type, SignalData *master_changed)
switch (type) {
case NM_LINK_TYPE_BRIDGE:
if (nmtstp_is_sysfs_writable ()) {
- g_assert (nm_platform_slave_set_option (NM_PLATFORM_GET, ifindex, "priority", "789"));
- value = nm_platform_slave_get_option (NM_PLATFORM_GET, ifindex, "priority");
+ g_assert (nm_platform_sysctl_slave_set_option (NM_PLATFORM_GET, ifindex, "priority", "789"));
+ value = nm_platform_sysctl_slave_get_option (NM_PLATFORM_GET, ifindex, "priority");
g_assert_cmpstr (value, ==, "789");
g_free (value);
}
@@ -367,16 +367,16 @@ test_software (NMLinkType link_type, const char *link_typename)
switch (link_type) {
case NM_LINK_TYPE_BRIDGE:
if (nmtstp_is_sysfs_writable ()) {
- g_assert (nm_platform_master_set_option (NM_PLATFORM_GET, ifindex, "forward_delay", "789"));
- value = nm_platform_master_get_option (NM_PLATFORM_GET, ifindex, "forward_delay");
+ g_assert (nm_platform_sysctl_master_set_option (NM_PLATFORM_GET, ifindex, "forward_delay", "789"));
+ value = nm_platform_sysctl_master_get_option (NM_PLATFORM_GET, ifindex, "forward_delay");
g_assert_cmpstr (value, ==, "789");
g_free (value);
}
break;
case NM_LINK_TYPE_BOND:
if (nmtstp_is_sysfs_writable ()) {
- g_assert (nm_platform_master_set_option (NM_PLATFORM_GET, ifindex, "mode", "active-backup"));
- value = nm_platform_master_get_option (NM_PLATFORM_GET, ifindex, "mode");
+ g_assert (nm_platform_sysctl_master_set_option (NM_PLATFORM_GET, ifindex, "mode", "active-backup"));
+ value = nm_platform_sysctl_master_get_option (NM_PLATFORM_GET, ifindex, "mode");
/* When reading back, the output looks slightly different. */
g_assert (g_str_has_prefix (value, "active-backup"));
g_free (value);