diff options
author | Thomas Haller <thaller@redhat.com> | 2018-10-09 13:08:24 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-10-10 09:55:45 +0200 |
commit | 99d3b6930b0bb3fcf5e1e28ec13cb8093c355e4b (patch) | |
tree | d45edae73fc8771abfeb9abdee1f04c4a711c05b /clients/cli/nmcli.c | |
parent | 411243c6541e2a82c21b19efc538ced9d01f8cb4 (diff) | |
download | NetworkManager-99d3b6930b0bb3fcf5e1e28ec13cb8093c355e4b.tar.gz |
cli: don't use global variable nm_cli in nmc_terminal_spawn_pager()
print_required_fields() still accesses the global variable.
We can only move the uses of globals up the call-stack, one
bit at a time.
Diffstat (limited to 'clients/cli/nmcli.c')
-rw-r--r-- | clients/cli/nmcli.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index bbfc310d6c..df152c1f87 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -998,6 +998,14 @@ nmc_value_transforms_register (void) nmc_convert_bytes_to_string); } +void +nm_cli_spawn_pager (NmCli *nmc) +{ + if (nmc->pager_pid > 0) + return; + nmc->pager_pid = nmc_terminal_spawn_pager (&nmc->nmc_config); +} + static void nmc_cleanup (NmCli *nmc) { |