GNU bug report logs - #14113
[PATCH] human: add unambiguous block_size_args

Previous Next

Package: coreutils;

Reported by: Mihai Capotă <mihai <at> mihaic.ro>

Date: Mon, 1 Apr 2013 12:42:02 UTC

Severity: normal

Tags: patch, wontfix

Merged with 7176

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14113 in the body.
You can then email your comments to 14113 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#14113; Package coreutils. (Mon, 01 Apr 2013 12:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mihai Capotă <mihai <at> mihaic.ro>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 01 Apr 2013 12:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mihai Capotă <mihai <at> mihaic.ro>
To: P <at> draigbrady.com
Cc: 7176 <at> debbugs.gnu.org, bug-gnulib <at> gnu.org, bug-coreutils <at> gnu.org
Subject: [PATCH] human: add unambiguous block_size_args
Date: Mon,  1 Apr 2013 14:38:25 +0200
The units used in the outputs of "human-readable" and "si" look
identical when "K/k" is not present. Add two block_size_args, "binary"
and "decimal", that disambiguate between the outputs of "human-readable"
and "si" by adding human_B to the list of options.

See bug 7176 in GNU coreutils,
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7176>.
---
 lib/human.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/human.c b/lib/human.c
index 613dc65..66a1835 100644
--- a/lib/human.c
+++ b/lib/human.c
@@ -394,11 +394,21 @@ human_readable (uintmax_t n, char *buf, int opts,
 # define DEFAULT_BLOCK_SIZE 1024
 #endif
 
-static char const *const block_size_args[] = { "human-readable", "si", 0 };
+static char const *const block_size_args[] =
+  {
+    "human-readable",
+    "si",
+    "binary",
+    "decimal",
+    0
+  };
+
 static int const block_size_opts[] =
   {
     human_autoscale + human_SI + human_base_1024,
-    human_autoscale + human_SI
+    human_autoscale + human_SI,
+    human_autoscale + human_SI + human_base_1024 + human_B,
+    human_autoscale + human_SI + human_B
   };
 
 static uintmax_t
-- 
1.7.9.5





Forcibly Merged 7176 14113. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Sat, 13 Apr 2013 23:57:02 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 09 Oct 2018 20:42:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 7176 <at> debbugs.gnu.org and Mihai Capotă <mihai <at> mihaic.ro> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 09 Oct 2018 20:42:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 07 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.