From patchwork Mon Nov 18 22:58:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariel Otilibili-Anieli X-Patchwork-Id: 13879143 Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F24731E9060; Mon, 18 Nov 2024 22:59:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.55.113.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731970773; cv=none; b=Ph1Cuq9SPNqn8KbGkb28JvUPqMysUCUSbRBsCz76Kwm22sgBA9CE3ZoHESXTyKLigdHRHCezW5EVbBRwAOlhgb0EvBRwNaL+VJCNZePxiUCT3QyT5imeD0aiGKjCu+xvoeqEKWCvHfNnGMEiZsPOZeCUDH25VBnGegYBWweDnzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731970773; c=relaxed/simple; bh=uOCkzoSHiJAiDYZFusLJ9OBEz5FlpCa8Y8HqQeFA+1E=; h=From:Content-Type:Date:Cc:To:MIME-Version:Message-ID:Subject; b=OVITbaoftdxUt82XywAxYeLizq6miGyg0SJyHWJICMF/Pr2n8U26/wN+5PzbWZJ1a4tsPr4BHEoDZHB1BiAmEI68jWi1iUSHvyzmcZRe9Ew2V6ShGZPPej2ixj3q4ZBckv8eDUiabelmTwyRrFSRD3kCWHXZuj00qif7TNIRwVI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=eurecom.fr; spf=pass smtp.mailfrom=eurecom.fr; dkim=pass (1024-bit key) header.d=eurecom.fr header.i=@eurecom.fr header.b=mkDNjK+5; arc=none smtp.client-ip=193.55.113.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=eurecom.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=eurecom.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=eurecom.fr header.i=@eurecom.fr header.b="mkDNjK+5" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1731970770; x=1763506770; h=from:date:cc:to:mime-version:message-id:subject: content-transfer-encoding; bh=uOCkzoSHiJAiDYZFusLJ9OBEz5FlpCa8Y8HqQeFA+1E=; b=mkDNjK+5oXGMcneWBxWlDF1RyrVVErgT9wLKAnXgL+nCS4bvldQeQPlS keDwWycSrJumxOhOJOaj5mbGs/xCqvffXpATG4C/PKBuJtxKJvTzoG/8c dWvmVkJKfWi/E0QrVrNLh/taPsv18i9hAuCVy2d0RsZeK1yfO6CfbJ31G U=; X-CSE-ConnectionGUID: kke0BuBSRh+JtWNKrNCVXw== X-CSE-MsgGUID: 74tnPZa7RO2m9bpH3+iY2Q== X-IronPort-AV: E=Sophos;i="6.12,165,1728943200"; d="scan'208";a="27706713" Received: from quovadis.eurecom.fr ([10.3.2.233]) by drago1i.eurecom.fr with ESMTP; 18 Nov 2024 23:58:18 +0100 From: "Ariel Otilibili-Anieli" X-Forward: 88.183.119.157 Date: Mon, 18 Nov 2024 23:58:18 +0100 Cc: =?utf-8?q?Jason_A=2E_Donenfeld?= , "Andrew Lunn" , =?utf-8?q?David_S=2E_Miller?= , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" To: wireguard@lists.zx2c4.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <15e782-673bc680-4ed-422b5480@29006332> Subject: [PATCH] =?utf-8?q?wireguard-tools=3A?= Extracted error message for the sake of legibility User-Agent: SOGoMail 5.11.1 Hello, This is a reminder about a patch sent to the WireGuard mailing list; CCing the maintainers of drivers/net/wireguard/; below a verbatim of my cover letter. Thank you, ** I have been using WireGuard for some time; it does ease the configuration of VPNs. This is my first patch to the list, I asked to be subscribed; please confirm me it is the case. I would like to improve my C programming skills; your feedback will be much appreciated. Ariel -------- Original Message -------- Subject: [PATCH] wireguard-tools: Extracted error message for the sake of legibility Date: Thursday, August 01, 2024 11:43 CEST From: Ariel Otilibili Reply-To: Ariel Otilibili To: wireguard@lists.zx2c4.com CC: "Jason A . Donenfeld" , Ariel Otilibili References: <20240725204917.192647-2-otilibil@eurecom.fr> <20240801094932.4502-1-otilibil@eurecom.fr> Signed-off-by: Ariel Otilibili --- src/set.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/set.c b/src/set.c index 75560fd..b2fbd54 100644 --- a/src/set.c +++ b/src/set.c @@ -16,9 +16,19 @@ int set_main(int argc, const char *argv[]) { struct wgdevice *device = NULL; int ret = 1; + const char *error_message = "Usage: %s %s " + " [listen-port ]" + " [fwmark ]" + " [private-key ]" + " [peer [remove]" + " [preshared-key ]" + " [endpoint :]" + " [persistent-keepalive ]" + " [allowed-ips /[,/]...]" + " ]...\n"; if (argc < 3) { - fprintf(stderr, "Usage: %s %s [listen-port ] [fwmark ] [private-key ] [peer [remove] [preshared-key ] [endpoint :] [persistent-keepalive ] [allowed-ips /[,/]...] ]...\n", PROG_NAME, argv[0]); + fprintf(stderr, error_message, PROG_NAME, argv[0]); return 1; }