diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-25 15:29:59 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-25 15:29:59 -0500 |
commit | 06fb28b16eb4b6170c2e2c0cf1f673730309509b (patch) | |
tree | 785adf7225d02701b4b0418c61ef0c0c3a24848b /src/network | |
parent | 8984d7bb5cc1d34cae4ec31696974a9e9f0dca44 (diff) | |
parent | ea4b98e6577ad4311e4eb4d2384c82f0d870b5ba (diff) |
Merge pull request #2671 from 0xAX/move-pager-open-to-one-place
tree-wide: merge pager_open_if_enabled() to the pager_open()
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkctl.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 6b1fbc603e..0679114f74 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -53,14 +53,6 @@ static bool arg_no_pager = false; static bool arg_legend = true; static bool arg_all = false; -static void pager_open_if_enabled(void) { - - if (arg_no_pager) - return; - - pager_open(false); -} - static int link_get_type_string(unsigned short iftype, sd_device *d, char **ret) { const char *t; char *p; @@ -300,7 +292,7 @@ static int list_links(int argc, char *argv[], void *userdata) { if (c < 0) return c; - pager_open_if_enabled(); + pager_open(arg_no_pager, false); if (arg_legend) printf("%3s %-16s %-18s %-11s %-10s\n", @@ -854,7 +846,7 @@ static int link_status(int argc, char *argv[], void *userdata) { _cleanup_free_ LinkInfo *links = NULL; int r, c, i; - pager_open_if_enabled(); + pager_open(arg_no_pager, false); r = sd_netlink_open(&rtnl); if (r < 0) @@ -950,7 +942,7 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) { if (c < 0) return c; - pager_open_if_enabled(); + pager_open(arg_no_pager, false); if (arg_legend) printf("%-16s %-17s %-16s %-11s %-17s %-16s\n", |