tools: add -n shortcut for --dry-run

Accept -n as a short option for --dry-run in bootctl,
systemd-oomd, systemd-sysusers, and systemd-tmpfiles.

For systemd-repart, make -n equivalent to --dry-run=yes,
while keeping --dry-run=BOOL available.

Follow-up for: 2479f0bb09
This commit is contained in:
dongshengyuan
2026-07-29 03:47:58 +09:00
committed by Yu Watanabe
parent efc207d7ab
commit f5ffb38606
16 changed files with 31 additions and 15 deletions
+1 -1
View File
@@ -2182,7 +2182,7 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) {
arg_replace = opts.arg;
break;
OPTION_LONG("dry-run", NULL, "Just print what would be done"):
OPTION('n', "dry-run", NULL, "Just print what would be done"):
arg_dry_run = true;
break;