Extracted error message for the sake of legibility
Hello,
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
PATCH 1/1 Extracted error message for the sake of legibility
Signed-off-by Ariel Otilibili <[email protected]>
--- src/set.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
src/set.c +11 -1
@@ -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 <interface>" +" [listen-port <port>]" +" [fwmark <mark>]" +" [private-key <file path>]" +" [peer <base64 public key> [remove]" +" [preshared-key <file path>]" +" [endpoint <ip>:<port>]" +" [persistent-keepalive <interval seconds>]" +" [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...]" +" ]...\n" ;if (argc <3 ) { -fprintf (stderr,"Usage: %s %s <interface> [listen-port <port>] [fwmark <mark>] [private-key <file path>] [peer <base64 public key> [remove] [preshared-key <file path>] [endpoint <ip>:<port>] [persistent-keepalive <interval seconds>] [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...] ]...\n" ,PROG_NAME , argv[0 ]); +fprintf (stderr, error_message,PROG_NAME , argv[0 ]);return 1 ; }
Signature · 1 line
2.45.2
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 wireguard-tools: Extracted error message for the sake of legibility
Signed-off-by Ariel Otilibili <[email protected]>
--- src/set.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
src/set.c +11 -1
@@ -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 <interface>" +" [listen-port <port>]" +" [fwmark <mark>]" +" [private-key <file path>]" +" [peer <base64 public key> [remove]" +" [preshared-key <file path>]" +" [endpoint <ip>:<port>]" +" [persistent-keepalive <interval seconds>]" +" [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...]" +" ]...\n" ;if (argc <3 ) { -fprintf (stderr,"Usage: %s %s <interface> [listen-port <port>] [fwmark <mark>] [private-key <file path>] [peer <base64 public key> [remove] [preshared-key <file path>] [endpoint <ip>:<port>] [persistent-keepalive <interval seconds>] [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...] ]...\n" ,PROG_NAME , argv[0 ]); +fprintf (stderr, error_message,PROG_NAME , argv[0 ]);return 1 ; }
Signature · 1 line
2.45.2