summaryrefslogtreecommitdiff
path: root/src/machine/machinectl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-02-25 15:29:59 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-02-25 15:29:59 -0500
commit06fb28b16eb4b6170c2e2c0cf1f673730309509b (patch)
tree785adf7225d02701b4b0418c61ef0c0c3a24848b /src/machine/machinectl.c
parent8984d7bb5cc1d34cae4ec31696974a9e9f0dca44 (diff)
parentea4b98e6577ad4311e4eb4d2384c82f0d870b5ba (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/machine/machinectl.c')
-rw-r--r--src/machine/machinectl.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 492d35f86f..e49c90fd1b 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -80,14 +80,6 @@ static const char* arg_format = NULL;
static const char *arg_uid = NULL;
static char **arg_setenv = NULL;
-static void pager_open_if_enabled(void) {
-
- if (arg_no_pager)
- return;
-
- pager_open(false);
-}
-
static void polkit_agent_open_if_enabled(void) {
/* Open the polkit agent as a child process if necessary */
@@ -135,7 +127,7 @@ static int list_machines(int argc, char *argv[], void *userdata) {
assert(bus);
- pager_open_if_enabled();
+ pager_open(arg_no_pager, false);
r = sd_bus_call_method(
bus,
@@ -238,7 +230,7 @@ static int list_images(int argc, char *argv[], void *userdata) {
assert(bus);
- pager_open_if_enabled();
+ pager_open(arg_no_pager, false);
r = sd_bus_call_method(
bus,
@@ -707,7 +699,7 @@ static int show_machine(int argc, char *argv[], void *userdata) {
properties = !strstr(argv[0], "status");
- pager_open_if_enabled();
+ pager_open(arg_no_pager, false);
if (properties && argc <= 1) {
@@ -956,7 +948,7 @@ static int show_image(int argc, char *argv[], void *userdata) {
properties = !strstr(argv[0], "status");
- pager_open_if_enabled();
+ pager_open(arg_no_pager, false);
if (argc <= 1) {
@@ -2189,7 +2181,7 @@ static int list_transfers(int argc, char *argv[], void *userdata) {
double progress;
int r;
- pager_open_if_enabled();
+ pager_open(arg_no_pager, false);
r = sd_bus_call_method(
bus,