From 24af0488122c8cc6accd53b20ed29eb1fa3c5fda Mon Sep 17 00:00:00 2001 From: Alexander GQ Gerasiov Date: Sat, 11 Apr 2020 13:46:56 +0300 Subject: [PATCH] isotpdump.c: Reformat help/usage output to be compatible with help2man. Gbp-Pq: Name 0012-isotpdump.c-Reformat-help-usage-output-to-be-compati.patch --- isotpdump.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/isotpdump.c b/isotpdump.c index f2db482..6b90e08 100644 --- a/isotpdump.c +++ b/isotpdump.c @@ -68,20 +68,22 @@ const int canfd_on = 1; void print_usage(char *prg) { fprintf(stderr, "\nUsage: %s [options] \n", prg); - fprintf(stderr, "Options: -s (source can_id. Use 8 digits for extended IDs)\n"); - fprintf(stderr, " -d (destination can_id. Use 8 digits for extended IDs)\n"); - fprintf(stderr, " -x (extended addressing mode. Use 'any' for all addresses)\n"); - fprintf(stderr, " -X (extended addressing mode (rx addr). Use 'any' for all)\n"); - fprintf(stderr, " -c (color mode)\n"); - fprintf(stderr, " -a (print data also in ASCII-chars)\n"); - fprintf(stderr, " -t (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)\n"); - fprintf(stderr, " -u (print uds messages)\n"); + fprintf(stderr, "Options:\n"); + fprintf(stderr, " -s (source can_id. Use 8 digits for extended IDs)\n"); + fprintf(stderr, " -d (destination can_id. Use 8 digits for extended IDs)\n"); + fprintf(stderr, " -x (extended addressing mode. Use 'any' for all addresses)\n"); + fprintf(stderr, " -X (extended addressing mode (rx addr). Use 'any' for all)\n"); + fprintf(stderr, " -c (color mode)\n"); + fprintf(stderr, " -a (print data also in ASCII-chars)\n"); + fprintf(stderr, " -t (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)\n"); + fprintf(stderr, " -u (print uds messages)\n"); fprintf(stderr, "\nCAN IDs and addresses are given and expected in hexadecimal values.\n"); - fprintf(stderr, "\nUDS output contains a flag which provides information about the type of the message.\n"); - fprintf(stderr, "Flags: [SRQ] = Service Request\n"); - fprintf(stderr, " [PSR] = Positive Service Response\n"); - fprintf(stderr, " [NRC] = Negative Response Code\n"); - fprintf(stderr, " [???] = Unknown (not specified)\n"); + fprintf(stderr, "\nUDS output contains a flag which provides information about the type of the message.\n\n"); + fprintf(stderr, "Flags:\n"); + fprintf(stderr, " [SRQ] = Service Request\n"); + fprintf(stderr, " [PSR] = Positive Service Response\n"); + fprintf(stderr, " [NRC] = Negative Response Code\n"); + fprintf(stderr, " [???] = Unknown (not specified)\n"); fprintf(stderr, "\n"); }