projects
/
sysstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53266a8
)
Workaround for Linux 3.14
author
norly
<ny-git@enpas.org>
Wed, 28 May 2014 19:11:11 +0000
(21:11 +0200)
committer
norly
<ny-git@enpas.org>
Wed, 28 May 2014 19:11:11 +0000
(21:11 +0200)
src/status/memusage.c
patch
|
blob
|
history
diff --git
a/src/status/memusage.c
b/src/status/memusage.c
index 6e715145aa6940a91e98db092505ce379fb96898..15523de20008e1e42c3d93b9a682ef355457ac25 100644
(file)
--- a/
src/status/memusage.c
+++ b/
src/status/memusage.c
@@
-1,5
+1,6
@@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "common.h"
#include "tools.h"
@@
-33,6
+34,9
@@
void status_memusage(GlobalData *g)
memfree = atoi(&stline[17]);
stlen = getline(&stline, &stlen, stfile);
+ if (stlen > 13 && !memcmp(stline, "MemAvailable:", 13)) {
+ stlen = getline(&stline, &stlen, stfile);
+ }
membuffers = atoi(&stline[17]);
stlen = getline(&stline, &stlen, stfile);