This seems to be locale issue. Mine is "LANG=fi_FI.UTF-8".

In case somebody encounters same issue with another locale, solution:
sudo smartctl -a /dev/sda | grep Capacity | hexdump -C
00000000  55 73 65 72 20 43 61 70  61 63 69 74 79 3a 20 20  |User Capacity:  |
00000010  20 20 36 30 c2 a0 30 32  32 c2 a0 34 38 30 c2 a0  |  60..022..480..|
00000020  38 39 36 20 62 79 74 65  73 20 5b 36 30 2c 30 20  |896 bytes [60,0 |
00000030  47 42 5d 0a                                       |GB].|
00000034

-> Code already handles 'French separator' = "a0". So add "c2" too.

Patch:
--- gsmartcontrol-0.8.7.orig/src/applib/smartctl_parser.cpp
+++ gsmartcontrol-0.8.7/src/applib/smartctl_parser.cpp
@@ -289,6 +289,7 @@ std::string SmartctlParser::parse_byte_s
        to_replace.push_back(",");
        to_replace.push_back(".");
        to_replace.push_back(std::string(1, 0xa0));
+       to_replace.push_back(std::string(1, 0xc2));

 #ifdef _WIN32
        // if current locale is C, then probably we didn't change it at 
application

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1463108

Title:
  gsmartcontrol shows capacity wrongly (truncating)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gsmartcontrol/+bug/1463108/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to