systemctl: add --verbose mode
This commit is contained in:
@@ -90,6 +90,7 @@ bool arg_show_types = false;
|
||||
int arg_check_inhibitors = -1;
|
||||
bool arg_dry_run = false;
|
||||
bool arg_quiet = false;
|
||||
bool arg_verbose = false;
|
||||
bool arg_no_warn = false;
|
||||
bool arg_full = false;
|
||||
bool arg_recursive = false;
|
||||
@@ -304,6 +305,7 @@ static int systemctl_help(void) {
|
||||
" suspend-then-hibernate, hybrid-sleep, default,\n"
|
||||
" rescue, emergency, and exit.\n"
|
||||
" -q --quiet Suppress output\n"
|
||||
" -v --verbose Show unit logs while executing operation\n"
|
||||
" --no-warn Suppress several warnings shown by default\n"
|
||||
" --wait For (re)start, wait until service stopped again\n"
|
||||
" For is-system-running, wait until startup is completed\n"
|
||||
@@ -510,6 +512,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
|
||||
{ "no-wall", no_argument, NULL, ARG_NO_WALL },
|
||||
{ "dry-run", no_argument, NULL, ARG_DRY_RUN },
|
||||
{ "quiet", no_argument, NULL, 'q' },
|
||||
{ "verbose", no_argument, NULL, 'v' },
|
||||
{ "no-warn", no_argument, NULL, ARG_NO_WARN },
|
||||
{ "root", required_argument, NULL, ARG_ROOT },
|
||||
{ "image", required_argument, NULL, ARG_IMAGE },
|
||||
@@ -556,7 +559,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
|
||||
/* We default to allowing interactive authorization only in systemctl (not in the legacy commands) */
|
||||
arg_ask_password = true;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "hC:t:p:P:alqfs:H:M:n:o:iTr.::", options, NULL)) >= 0)
|
||||
while ((c = getopt_long(argc, argv, "hC:t:p:P:alqvfs:H:M:n:o:iTr.::", options, NULL)) >= 0)
|
||||
|
||||
switch (c) {
|
||||
|
||||
@@ -770,6 +773,10 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
|
||||
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
arg_verbose = true;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
arg_force++;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user