From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 4D96C5A027A for ; Thu, 6 Apr 2023 05:28:28 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PsRm55y6bz4xFZ; Thu, 6 Apr 2023 13:28:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1680751701; bh=3iafrCoNBCTR+UQwe6tEnhEw8WX19mWmhi5zBvPlCQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WugWw+0EU3pkOkNFEelWWong4+7EUDWiX9FnCu5bql8afubWfH91kD7d55zYxfneg aK8Gx5Kb0JuWThMYVyO9uZA3bq9OrxdUwxXvBNxJunosMPRg6YgadjYa3IqeBBEUHb PrvocvvQmLEBNUO4bXZTdQONmIQO7pXa7qMgAemo= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 03/14] nstool: Move description of its operation modes from comment to usage Date: Thu, 6 Apr 2023 13:28:08 +1000 Message-Id: <20230406032819.707441-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406032819.707441-1-david@gibson.dropbear.id.au> References: <20230406032819.707441-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 7PJNKEONMXRBUZHDVZ3S3YIMF4A3U2SB X-Message-ID-Hash: 7PJNKEONMXRBUZHDVZ3S3YIMF4A3U2SB 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 c38d96f..92909c2 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 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) -- 2.39.2