From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH 2/3] nsenter: (usage) improve the alignment of the option descriptions
Date: Sun, 8 Mar 2026 12:20:03 +0100 [thread overview]
Message-ID: <20260308112004.9206-2-bensberg@telfort.nl> (raw)
In-Reply-To: <20260308112004.9206-1-bensberg@telfort.nl>
Perfect alignment is not possible, otherwise too little space remains
for the descriptions.
Also, slightly reword one description to fit within 80 columns again,
and align also a description that was missed by commit 986188d1da two
monts ago.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/nsenter.c | 46 ++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
index 98da75511..e10ba9cf9 100644
--- a/sys-utils/nsenter.c
+++ b/sys-utils/nsenter.c
@@ -95,34 +95,34 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_("Run a program with namespaces of other processes.\n"), out);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -a, --all enter all namespaces\n"), out);
- fputs(_(" -t, --target <PID> target process to get namespaces from\n"), out);
- fputs(_(" -m, --mount[=<file>|=:<nsid>] enter mount namespace\n"), out);
- fputs(_(" -u, --uts[=<file>|=:<nsid>] enter UTS namespace (hostname etc)\n"), out);
- fputs(_(" -i, --ipc[=<file>|=:<nsid>] enter System V IPC namespace\n"), out);
- fputs(_(" -n, --net[=<file>|=:<nsid>] enter network namespace\n"), out);
- fputs(_(" -N, --net-socket <fd> enter socket's network namespace (use with --target)\n"), out);
- fputs(_(" -p, --pid[=<file>|=:<nsid>] enter pid namespace\n"), out);
+ fputs(_(" -a, --all enter all namespaces\n"), out);
+ fputs(_(" -t, --target <PID> target process to get namespaces from\n"), out);
+ fputs(_(" -m, --mount[=<file>|=:<nsid>] enter mount namespace\n"), out);
+ fputs(_(" -u, --uts[=<file>|=:<nsid>] enter UTS namespace (hostname etc)\n"), out);
+ fputs(_(" -i, --ipc[=<file>|=:<nsid>] enter System V IPC namespace\n"), out);
+ fputs(_(" -n, --net[=<file>|=:<nsid>] enter network namespace\n"), out);
+ fputs(_(" -N, --net-socket <fd> enter socket's network namespace (needs --target)\n"), out);
+ fputs(_(" -p, --pid[=<file>|=:<nsid>] enter pid namespace\n"), out);
fputs(_(" -C, --cgroup[=<file>|=:<nsid>] enter cgroup namespace\n"), out);
- fputs(_(" -U, --user[=<file>|=:<nsid>] enter user namespace\n"), out);
- fputs(_(" --user-parent enter parent user namespace\n"), out);
- fputs(_(" -T, --time[=<file>|=:<nsid>] enter time namespace\n"), out);
- fputs(_(" -S, --setuid[=<uid>] set uid in entered namespace\n"), out);
- fputs(_(" -G, --setgid[=<gid>] set gid in entered namespace\n"), out);
- fputs(_(" --preserve-credentials do not touch uids or gids\n"), out);
- fputs(_(" --keep-caps retain capabilities granted in user namespaces\n"), out);
- fputs(_(" -r, --root[=<dir>] set the root directory\n"), out);
- fputs(_(" -w, --wd[=<dir>] set the working directory\n"), out);
- fputs(_(" -W, --wdns <dir> set the working directory in namespace\n"), out);
- fputs(_(" -e, --env inherit environment variables from target process\n"), out);
- fputs(_(" -F, --no-fork do not fork before exec'ing <program>\n"), out);
- fputs(_(" -c, --join-cgroup join the cgroup of the target process\n"), out);
+ fputs(_(" -U, --user[=<file>|=:<nsid>] enter user namespace\n"), out);
+ fputs(_(" --user-parent enter parent user namespace\n"), out);
+ fputs(_(" -T, --time[=<file>|=:<nsid>] enter time namespace\n"), out);
+ fputs(_(" -S, --setuid[=<uid>] set uid in entered namespace\n"), out);
+ fputs(_(" -G, --setgid[=<gid>] set gid in entered namespace\n"), out);
+ fputs(_(" --preserve-credentials do not touch uids or gids\n"), out);
+ fputs(_(" --keep-caps retain capabilities granted in user namespaces\n"), out);
+ fputs(_(" -r, --root[=<dir>] set the root directory\n"), out);
+ fputs(_(" -w, --wd[=<dir>] set the working directory\n"), out);
+ fputs(_(" -W, --wdns <dir> set the working directory in namespace\n"), out);
+ fputs(_(" -e, --env inherit environment variables from target process\n"), out);
+ fputs(_(" -F, --no-fork do not fork before exec'ing <program>\n"), out);
+ fputs(_(" -c, --join-cgroup join the cgroup of the target process\n"), out);
#ifdef HAVE_LIBSELINUX
- fputs(_(" -Z, --follow-context set SELinux context according to --target PID\n"), out);
+ fputs(_(" -Z, --follow-context set SELinux context according to --target PID\n"), out);
#endif
fputs(USAGE_SEPARATOR, out);
- fprintf(out, USAGE_HELP_OPTIONS(30));
+ fprintf(out, USAGE_HELP_OPTIONS(31));
fprintf(out, USAGE_MAN_TAIL("nsenter(1)"));
exit(EXIT_SUCCESS);
--
2.53.0
next prev parent reply other threads:[~2026-03-08 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 11:20 [PATCH 1/3] nsenter: (usage) correct the formatting of eight option arguments Benno Schulenberg
2026-03-08 11:20 ` Benno Schulenberg [this message]
2026-03-08 11:20 ` [PATCH 3/3] nsenter: (man) correct the markup and improve the formatting Benno Schulenberg
2026-03-09 1:52 ` [PATCH 1/3] nsenter: (usage) correct the formatting of eight option arguments Xiao Liang
2026-03-12 10:14 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260308112004.9206-2-bensberg@telfort.nl \
--to=bensberg@telfort.nl \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox