Skip to content

Commit

Permalink
nspawn: fix separating empty lines in --help text
Browse files Browse the repository at this point in the history
When I added the --background= switch I placed the empty line that was
supposed to separate the options from the next section before the switch
rather than after. Fix that.

To make issues like this harder to run into next time, let's move the \n
from the end of the preceeding line to the beginning of the section
title, since that's pretty much where they belong to.

Follow-up for: 3d8ba7b
  • Loading branch information
poettering authored and bluca committed Jan 23, 2024
1 parent a97476c commit 269f70d
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/nspawn/nspawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ static int help(void) {
" --version Print version string\n"
" -q --quiet Do not show status information\n"
" --no-pager Do not pipe output into a pager\n"
" --settings=BOOLEAN Load additional settings from .nspawn file\n\n"
"%3$sImage:%4$s\n"
" --settings=BOOLEAN Load additional settings from .nspawn file\n"
"\n%3$sImage:%4$s\n"
" -D --directory=PATH Root directory for the container\n"
" --template=PATH Initialize root directory from template directory,\n"
" if missing\n"
Expand All @@ -347,8 +347,8 @@ static int help(void) {
" 'base64:'\n"
" --verity-data=PATH Specify hash device for verity\n"
" --pivot-root=PATH[:PATH]\n"
" Pivot root to given directory in the container\n\n"
"%3$sExecution:%4$s\n"
" Pivot root to given directory in the container\n"
"\n%3$sExecution:%4$s\n"
" -a --as-pid2 Maintain a stub init as PID1, invoke binary as PID2\n"
" -b --boot Boot up full system (i.e. invoke init)\n"
" --chdir=PATH Set working directory in the container\n"
Expand All @@ -357,18 +357,18 @@ static int help(void) {
" --kill-signal=SIGNAL Select signal to use for shutting down PID 1\n"
" --notify-ready=BOOLEAN Receive notifications from the child init process\n"
" --suppress-sync=BOOLEAN\n"
" Suppress any form of disk data synchronization\n\n"
"%3$sSystem Identity:%4$s\n"
" Suppress any form of disk data synchronization\n"
"\n%3$sSystem Identity:%4$s\n"
" -M --machine=NAME Set the machine name for the container\n"
" --hostname=NAME Override the hostname for the container\n"
" --uuid=UUID Set a specific machine UUID for the container\n\n"
"%3$sProperties:%4$s\n"
" --uuid=UUID Set a specific machine UUID for the container\n"
"\n%3$sProperties:%4$s\n"
" -S --slice=SLICE Place the container in the specified slice\n"
" --property=NAME=VALUE Set scope unit property\n"
" --register=BOOLEAN Register container as machine\n"
" --keep-unit Do not register a scope for the machine, reuse\n"
" the service unit nspawn is running in\n\n"
"%3$sUser Namespacing:%4$s\n"
" the service unit nspawn is running in\n"
"\n%3$sUser Namespacing:%4$s\n"
" --private-users=no Run without user namespacing\n"
" --private-users=yes|pick|identity\n"
" Run within user namespace, autoselect UID/GID range\n"
Expand All @@ -378,8 +378,8 @@ static int help(void) {
" Adjust ('chown') or map ('map') OS tree ownership\n"
" to private UID/GID range\n"
" -U Equivalent to --private-users=pick and\n"
" --private-users-ownership=auto\n\n"
"%3$sNetworking:%4$s\n"
" --private-users-ownership=auto\n"
"\n%3$sNetworking:%4$s\n"
" --private-network Disable network in container\n"
" --network-interface=HOSTIF[:CONTAINERIF]\n"
" Assign an existing network interface to the\n"
Expand All @@ -404,8 +404,8 @@ static int help(void) {
" Set network namespace to the one represented by\n"
" the specified kernel namespace file node\n"
" -p --port=[PROTOCOL:]HOSTPORT[:CONTAINERPORT]\n"
" Expose a container IP port on the host\n\n"
"%3$sSecurity:%4$s\n"
" Expose a container IP port on the host\n"
"\n%3$sSecurity:%4$s\n"
" --capability=CAP In addition to the default, retain specified\n"
" capability\n"
" --drop-capability=CAP Drop the specified capability from the default set\n"
Expand All @@ -420,20 +420,20 @@ static int help(void) {
" processes in the container\n"
" -L --selinux-apifs-context=SECLABEL\n"
" Set the SELinux security context to be used by\n"
" API/tmpfs file systems in the container\n\n"
"%3$sResources:%4$s\n"
" API/tmpfs file systems in the container\n"
"\n%3$sResources:%4$s\n"
" --rlimit=NAME=LIMIT Set a resource limit for the payload\n"
" --oom-score-adjust=VALUE\n"
" Adjust the OOM score value for the payload\n"
" --cpu-affinity=CPUS Adjust the CPU affinity of the container\n"
" --personality=ARCH Pick personality for this container\n\n"
"%3$sIntegration:%4$s\n"
" --personality=ARCH Pick personality for this container\n"
"\n%3$sIntegration:%4$s\n"
" --resolv-conf=MODE Select mode of /etc/resolv.conf initialization\n"
" --timezone=MODE Select mode of /etc/localtime initialization\n"
" --link-journal=MODE Link up guest journal, one of no, auto, guest, \n"
" host, try-guest, try-host\n"
" -j Equivalent to --link-journal=try-guest\n\n"
"%3$sMounts:%4$s\n"
" -j Equivalent to --link-journal=try-guest\n"
"\n%3$sMounts:%4$s\n"
" --bind=PATH[:PATH[:OPTIONS]]\n"
" Bind mount a file or directory from the host into\n"
" the container\n"
Expand All @@ -447,13 +447,13 @@ static int help(void) {
" the container\n"
" --overlay-ro=PATH[:PATH...]:PATH\n"
" Similar, but creates a read-only overlay mount\n"
" --bind-user=NAME Bind user from host to container\n\n"
"%3$sInput/Output:%4$s\n"
" --bind-user=NAME Bind user from host to container\n"
"\n%3$sInput/Output:%4$s\n"
" --console=MODE Select how stdin/stdout/stderr and /dev/console are\n"
" set up for the container.\n"
" -P --pipe Equivalent to --console=pipe\n\n"
" -P --pipe Equivalent to --console=pipe\n"
" --background=COLOR Set ANSI color for background\n"
"%3$sCredentials:%4$s\n"
"\n%3$sCredentials:%4$s\n"
" --set-credential=ID:VALUE\n"
" Pass a credential with literal value to container.\n"
" --load-credential=ID:PATH\n"
Expand Down

0 comments on commit 269f70d

Please sign in to comment.