[PATCH] bcache: improve bch_hprint() output

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

 



From: mingzhe <mingzhe.zou@xxxxxxxxxxxx>

The current suffix of bch_hprint() uses the SI (The International System of Units)
standard. In the SI brochure, the symbol for the kilo prefix is k instead of K.
Because K is the symbol for the thermodynamic temperature unit kelvin.

In fact, SI is based on decimal not binary. However, bch_hprint() is binary based,
so it should conform to the IEC 60027-2 (Letter symbols to be used in electrical
technology - Part 2: Telecommunications and electronics) standard.

Signed-off-by: mingzhe <mingzhe.zou@xxxxxxxxxxxx>
---
 drivers/md/bcache/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c
index ae380bc3992e..91ab36ec2deb 100644
--- a/drivers/md/bcache/util.c
+++ b/drivers/md/bcache/util.c
@@ -91,7 +91,7 @@ STRTO_H(strtoull, unsigned long long)
  */
 ssize_t bch_hprint(char *buf, int64_t v)
 {
-	static const char units[] = "?kMGTPEZY";
+	static const char units[] = "?KMGTPEZY";
 	int u = 0, t;
 
 	uint64_t q;
-- 
2.17.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux