From: Benno Schulenberg Date: Sat, 15 Feb 2025 16:18:43 +0000 (+0100) Subject: unshare: in usage text, reshuffle options into somewhat related groups X-Git-Tag: v2.42-start~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f87ea6b253b46f4c8398dde9969bf76117733c2;p=thirdparty%2Futil-linux.git unshare: in usage text, reshuffle options into somewhat related groups First the mount-related options (because --mount was the first namespace option earlier) plus two other options about folders; then the options about UIDS and GIDS; then two options about forking; then two miscellaneous options; and lastly the two options about time, as --time was the last namespace option. Signed-off-by: Benno Schulenberg --- diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index b6c2f8b45..9ec6ef7cc 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -781,7 +781,16 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -C, --cgroup[=] unshare cgroup namespace\n"), out); fputs(_(" -T, --time[=] unshare time namespace\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(_(" -f, --fork fork before launching \n"), out); + fputs(_(" --mount-proc[=] mount proc filesystem first (implies --mount)\n"), out); + fputs(_(" --mount-binfmt[=] mount binfmt filesystem first (implies --user and --mount)\n"), out); + fputs(_(" -l, --load-interp load binfmt definition in the namespace (implies --mount-binfmt)\n"), out); + fputs(_(" --propagation slave|shared|private|unchanged\n" + " modify mount propagation in mount namespace\n"), out); + fputs(_(" -R, --root run the command with root directory set to \n"), out); + fputs(_(" -w, --wd change working directory to \n"), out); + fputs(USAGE_SEPARATOR, out); + fputs(_(" -S, --setuid set uid in entered namespace\n"), out); + fputs(_(" -G, --setgid set gid in entered namespace\n"), out); fputs(_(" --map-user | map current user to uid (implies --user)\n"), out); fputs(_(" --map-group | map current group to gid (implies --user)\n"), out); fputs(_(" -r, --map-root-user map current user to root (implies --user)\n"), out); @@ -792,22 +801,15 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --map-groups ::\n" " map count groups from outergid to innergid (implies --user)\n"), out); fputs(USAGE_SEPARATOR, out); + fputs(_(" -f, --fork fork before launching \n"), out); fputs(_(" --kill-child[=] when dying, kill the forked child (implies --fork)\n" " defaults to SIGKILL\n"), out); - fputs(_(" --mount-proc[=] mount proc filesystem first (implies --mount)\n"), out); - fputs(_(" --mount-binfmt[=] mount binfmt filesystem first (implies --user and --mount)\n"), out); - fputs(_(" --propagation slave|shared|private|unchanged\n" - " modify mount propagation in mount namespace\n"), out); + fputs(USAGE_SEPARATOR, out); fputs(_(" --setgroups allow|deny control the setgroups syscall in user namespaces\n"), out); fputs(_(" --keep-caps retain capabilities granted in user namespaces\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(_(" -R, --root run the command with root directory set to \n"), out); - fputs(_(" -w, --wd change working directory to \n"), out); - fputs(_(" -S, --setuid set uid in entered namespace\n"), out); - fputs(_(" -G, --setgid set gid in entered namespace\n"), out); fputs(_(" --monotonic set clock monotonic offset (seconds) in time namespaces\n"), out); fputs(_(" --boottime set clock boottime offset (seconds) in time namespaces\n"), out); - fputs(_(" -l, --load-interp load binfmt definition in the namespace (implies --mount-binfmt)\n"), out); fputs(USAGE_SEPARATOR, out); fprintf(out, USAGE_HELP_OPTIONS(27));