coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/8] cksum: add --debug to --help output and man page


From: Pádraig Brady
Subject: [PATCH 5/8] cksum: add --debug to --help output and man page
Date: Tue, 7 Sep 2021 16:45:28 +0100

* src/cksum.c (usage): Add the --debug description,
which should have been part of commit v8.32-113-gb73b9fcb1
Also give explicit indication when using generic hardware.
---
 src/cksum.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/cksum.c b/src/cksum.c
index 3cc4296bc..9f8b0d821 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -344,6 +344,9 @@ Usage: %s [FILE]...\n\
       fputs (_("\
 Print CRC checksum and byte counts of each FILE.\n\
 \n\
+"), stdout);
+      fputs (_("\
+      --debug    indicate which implementation used\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -392,7 +395,10 @@ main (int argc, char **argv)
 # if USE_PCLMUL_CRC32
   if (pclmul_supported ())
      cksum_fp = cksum_pclmul;
+  else
 # endif /* USE_PCLMUL_CRC32 */
+  if (debug)
+    error (0, 0, "%s", _("using generic hardware support"));
 
   if (optind == argc)
     ok = cksum ("-", false);
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]