summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-07-24 14:12:58 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-07-31 22:48:22 -0400
commit2d37cd5356f666b399c5ae93ce77053f501d0e33 (patch)
tree56eb723c03cec414f8d415336ab014e4196d684d /src/network
parent0fbd465f4138dd2c3c7428c23cae117a7b56568d (diff)
Add enable_disable() helper
In this patch "enabled" and "disabled" is used exclusively, but "enable" and "disable" forms are need for the following patch.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 82f56158be..a0da697707 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -256,12 +256,8 @@ static int link_enable_ipv6(Link *link) {
r = write_string_file(p, one_zero(disabled), WRITE_STRING_FILE_VERIFY_ON_FAILURE);
if (r < 0)
log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m", disabled ? "disable" : "enable", link->ifname);
- else {
- if (disabled)
- log_link_info(link, "IPv6 disabled for interface: %m");
- else
- log_link_info(link, "IPv6 enabled for interface: %m");
- }
+ else
+ log_link_info(link, "IPv6 %sd for interface: %m", enable_disable(!disabled));
return 0;
}