summaryrefslogtreecommitdiff
path: root/components/ram.c
diff options
context:
space:
mode:
authorivan-boikov <ik.boikov.public@protonmail.com>2024-01-13 19:52:01 +0100
committerivan-boikov <ik.boikov.public@protonmail.com>2024-01-13 19:52:01 +0100
commit8b8363eaa2633c8a7392521416f45549ff10c164 (patch)
treec503f910abdc6b280895fa28e008bec8edd637e1 /components/ram.c
parentf68f49273e70b3767b30c549dda04ddd4d25fc91 (diff)
My initial changes
Diffstat (limited to 'components/ram.c')
-rw-r--r--components/ram.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/ram.c b/components/ram.c
index 15c4b74..503e7be 100644
--- a/components/ram.c
+++ b/components/ram.c
@@ -53,7 +53,8 @@
!= 1)
return NULL;
- return fmt_human(total * 1024, 1024);
+ //return fmt_human(total * 1024, 1024);
+ return bprintf("%.1f", total/1048576.);
}
const char *
@@ -71,7 +72,8 @@
return NULL;
used = (total - free - buffers - cached);
- return fmt_human(used * 1024, 1024);
+ //return fmt_human(used * 1024, 1024);
+ return bprintf("%4.1f", used/1048576.);
}
#elif defined(__OpenBSD__)
#include <stdlib.h>