diff options
author | Mats <d912e3@gmail.com> | 2013-12-05 22:12:17 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-12-10 21:18:14 +0100 |
commit | 596f2264f4bc3d50da425873a7941b4de99afcb8 (patch) | |
tree | d13fe8635b85515f40bb4d8033f7c802258aff80 /i3status.c | |
parent | 717484184f6e8a3bb38f50cc6fbe4fbfb3544cd9 (diff) |
disk: Distinguish between IEC, SI and custom prefixes
* IEC: Ki, Mi, Gi, Ti (powers of 1024)
* SI: k, M, G, T (powers of 1000)
* custom: K, M, G, T (powers of 1024)
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -288,6 +288,7 @@ int main(int argc, char *argv[]) { cfg_opt_t disk_opts[] = { CFG_STR("format", "%free", CFGF_NONE), + CFG_STR("prefix_type", "binary", CFGF_NONE), CFG_END() }; @@ -497,7 +498,7 @@ int main(int argc, char *argv[]) { CASE_SEC_TITLE("disk") { SEC_OPEN_MAP("disk_info"); - print_disk_info(json_gen, buffer, title, cfg_getstr(sec, "format")); + print_disk_info(json_gen, buffer, title, cfg_getstr(sec, "format"), cfg_getstr(sec, "prefix_type")); SEC_CLOSE_MAP; } |