mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-12 08:58:20 +03:00
nspawn: show --help text in a pager
The text is long enough now, and we do auto-paging for systemctl already, hence let's do it here too.
This commit is contained in:
parent
81f345dfed
commit
50ebcf6cb7
@ -75,6 +75,7 @@
|
||||
#include "nspawn-settings.h"
|
||||
#include "nspawn-setuid.h"
|
||||
#include "nspawn-stub-pid1.h"
|
||||
#include "pager.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
@ -208,6 +209,9 @@ static int arg_oom_score_adjust = 0;
|
||||
static bool arg_oom_score_adjust_set = false;
|
||||
|
||||
static void help(void) {
|
||||
|
||||
(void) pager_open(false, false);
|
||||
|
||||
printf("%s [OPTIONS...] [PATH] [ARGUMENTS...]\n\n"
|
||||
"Spawn a minimal namespace container for debugging, testing and building.\n\n"
|
||||
" -h --help Show this help\n"
|
||||
@ -4318,6 +4322,8 @@ finish:
|
||||
if (pid > 0)
|
||||
(void) wait_for_terminate(pid, NULL);
|
||||
|
||||
pager_close();
|
||||
|
||||
if (remove_directory && arg_directory) {
|
||||
int k;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user