From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 39B175A0273 for ; Tue, 4 Apr 2023 03:46:47 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Pr9bj3fqbz4xDr; Tue, 4 Apr 2023 11:46:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1680572801; bh=1ExRQXYe1SAM8jhATcJX1bprqSS304VlwkGIK8egE64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gDp+IQytavbT8gMjyeP1DkgeixQcq+jA+GCcNd+R4XACCUwjPvGPmLGplWpDNEc6+ UJogpc2xMaw8EAS2c/PeIG/+F149QDVBcVAKbTg2XWxP6e9PNL6eL5GVJ0i60w4VFH UXyXsrR0dEYTXrz9XcKe8ZRv+xUD6dp6g2CVXOlY= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 03/14] nstool: Move description of its operation modes from comment to usage Date: Tue, 4 Apr 2023 11:46:27 +1000 Message-Id: <20230404014638.3225556-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230404014638.3225556-1-david@gibson.dropbear.id.au> References: <20230404014638.3225556-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 72CUSDKWJJTUU3PLWFLCT3HWKS72U7UN X-Message-ID-Hash: 72CUSDKWJJTUU3PLWFLCT3HWKS72U7UN X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Easier to see it there. Signed-off-by: David Gibson --- test/nstool.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/test/nstool.c b/test/nstool.c index cc6d617..7e069b6 100644 --- a/test/nstool.c +++ b/test/nstool.c @@ -4,20 +4,6 @@ * * Copyright Red Hat * Author: David Gibson - * - * Can run in 3 modes: - * - * nstool hold - * Designed to be run inside a namespace, opens a Unix domain - * control socket at and waits until instructed to stop - * with "nstool stop " - * nstool pid - * Prints the PID of the nstool hold process with control socket - * . This is given in the PID namespace where nstool pid - * is executed, not the one where nstool hold is running - * nstool stop - * Instruct the nstool hold with control socket at to - * exit. */ #define _GNU_SOURCE @@ -38,7 +24,17 @@ static void usage(void) { - die("Usage: nstool hold|pid|stop \n"); + die("Usage:\n" + " nstool hold SOCK\n" + " Run within a set of namespaces, open a Unix domain control\n" + " socket at SOCK and wait for requests from other nstool\n" + " 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) -- 2.39.2