aboutgitcodebugslistschat
path: root/test/nstool.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-04-06 13:28:08 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-04-08 01:11:48 +0200
commit42fb218347c63001805bcfc436d294938c666d76 (patch)
treed6b25768c95d6a7b344244d830aff3769b43b58d /test/nstool.c
parent2884ccd2e701040723a5e32edfd98bdfb42bcf1b (diff)
downloadpasst-42fb218347c63001805bcfc436d294938c666d76.tar
passt-42fb218347c63001805bcfc436d294938c666d76.tar.gz
passt-42fb218347c63001805bcfc436d294938c666d76.tar.bz2
passt-42fb218347c63001805bcfc436d294938c666d76.tar.lz
passt-42fb218347c63001805bcfc436d294938c666d76.tar.xz
passt-42fb218347c63001805bcfc436d294938c666d76.tar.zst
passt-42fb218347c63001805bcfc436d294938c666d76.zip
nstool: Move description of its operation modes from comment to usage
Easier to see it there. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/nstool.c')
-rw-r--r--test/nstool.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/test/nstool.c b/test/nstool.c
index 8f66c98..20fcc4c 100644
--- a/test/nstool.c
+++ b/test/nstool.c
@@ -4,20 +4,6 @@
*
* Copyright Red Hat
* Author: David Gibson <david@gibson.dropbear.id.au>
- *
- * Can run in 3 modes:
- *
- * nstool hold <path>
- * Designed to be run inside a namespace, opens a Unix domain
- * control socket at <path> and waits until instructed to stop
- * with "nstool stop <path>"
- * nstool pid <path>
- * Prints the PID of the nstool hold process with control socket
- * <path>. This is given in the PID namespace where nstool pid
- * is executed, not the one where nstool hold is running
- * nstool stop <path>
- * Instruct the nstool hold with control socket at <path> to
- * exit.
*/
#define _GNU_SOURCE
@@ -38,7 +24,17 @@
static void usage(void)
{
- die("Usage: nstool hold|pid|stop <socket path>\n");
+ die("Usage:\n"
+ " nstool hold SOCK\n"
+ " Run within a set of namespaces, open a Unix domain socket\n"
+ " (the \"control socket\") at SOCK and wait for requests from\n"
+ " other nstool subcommands.\n"
+ " nstool pid SOCK\n"
+ " Print the pid of the nstool hold process with control socket\n"
+ " at SOCK, as seen in the caller's namespace.\n"
+ " nstool stop SOCK\n"
+ " Instruct the nstool hold with control socket at SOCK to\n"
+ " terminate.\n");
}
static void hold(int fd, const struct sockaddr_un *addr)