shared/options: add OPTION_COMMON_{SYSTEM,USER}
We have different help strings for --user/--system in different places, so this only covers a subset of --system/--user instances. But this particular help seems to be the most widely used. (In a few cases, the help string is fixed: it should be "system mode", not "per-system mode".)
This commit is contained in:
@@ -777,11 +777,11 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
OPTION_COMMON_VERSION:
|
||||
return version();
|
||||
|
||||
OPTION_LONG("system", NULL, "Operate in system mode"):
|
||||
OPTION_COMMON_SYSTEM:
|
||||
arg_runtime_scope = RUNTIME_SCOPE_SYSTEM;
|
||||
break;
|
||||
|
||||
OPTION_LONG("user", NULL, "Operate in user mode"):
|
||||
OPTION_COMMON_USER:
|
||||
arg_runtime_scope = RUNTIME_SCOPE_USER;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -433,11 +433,11 @@ static int parse_argv(int argc, char *argv[], char ***args) {
|
||||
arg_ask_password = false;
|
||||
break;
|
||||
|
||||
OPTION_LONG("system", NULL, "Operate in system mode"):
|
||||
OPTION_COMMON_SYSTEM:
|
||||
arg_runtime_scope = RUNTIME_SCOPE_SYSTEM;
|
||||
break;
|
||||
|
||||
OPTION_LONG("user", NULL, "Operate in user mode"):
|
||||
OPTION_COMMON_USER:
|
||||
arg_runtime_scope = RUNTIME_SCOPE_USER;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user