From f638cdc79bfd1fcb4b62ad93d84ea65eeb0a3836 Mon Sep 17 00:00:00 2001 From: Alexander GQ Gerasiov Date: Sat, 11 Apr 2020 13:46:56 +0300 Subject: [PATCH] slcanpty.c: Reformat help/usage output to be compatible with help2man. Gbp-Pq: Name 0029-slcanpty.c-Reformat-help-usage-output-to-be-compatib.patch --- slcanpty.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/slcanpty.c b/slcanpty.c index fd11cc8..c062e70 100644 --- a/slcanpty.c +++ b/slcanpty.c @@ -430,14 +430,15 @@ int main(int argc, char **argv) if (argc != 3) { fprintf(stderr, "\n"); fprintf(stderr, "%s creates a pty for applications using" - " the slcan ASCII protocol and\n", argv[0]); + " the slcan ASCII protocol and\n", basename(argv[0])); fprintf(stderr, "converts the ASCII data to a CAN network" " interface (and vice versa)\n\n"); - fprintf(stderr, "Usage: %s \n", argv[0]); - fprintf(stderr, "e.g. '%s /dev/ptyc0 can0' creates" - " /dev/ttyc0 for the slcan application\n", argv[0]); + fprintf(stderr, "Usage: %s \n", basename(argv[0])); + fprintf(stderr, "Examples:\n"); + fprintf(stderr, "%s /dev/ptyc0 can0 - creates /dev/ttyc0 for the slcan application\n\n", + basename(argv[0])); fprintf(stderr, "e.g. for pseudo-terminal '%s %s can0' creates" - " /dev/pts/N\n", argv[0], DEVICE_NAME_PTMX); + " /dev/pts/N\n", basename(argv[0]), DEVICE_NAME_PTMX); fprintf(stderr, "\n"); return 1; }