The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/153

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
the missing : makes the other branches for lines starting with "Active" and "Inactive" unreachable, leading to /proc/meminfo content like this:

...
Active:            24484 kB
Inactive:           7468 kB
Active:            24484 kB
Inactive:           7468 kB
Active:            24484 kB
Inactive:           7468 kB
...

instead of:

...
Active:            16020 kB
Inactive:        8372040 kB
Active(anon):      14580 kB
Inactive(anon):    14868 kB
Active(file):       1440 kB
Inactive(file):  8357172 kB
...

Signed-off-by: Fabian Grünbichler <[email protected]>
From 2f306ad3b96558dbcbb736e59612f5a68ccc500d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <[email protected]>
Date: Wed, 19 Oct 2016 09:16:36 +0200
Subject: [PATCH] fix Active/Inactive /proc/meminfo
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Fabian Grünbichler <[email protected]>
---
 bindings.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bindings.c b/bindings.c
index 228dad7..9fbabb6 100644
--- a/bindings.c
+++ b/bindings.c
@@ -3192,11 +3192,11 @@ static int proc_meminfo_read(char *buf, size_t size, 
off_t offset,
                } else if (startswith(line, "SwapCached:")) {
                        snprintf(lbuf, 100, "SwapCached:     %8lu kB\n", 0UL);
                        printme = lbuf;
-               } else if (startswith(line, "Active")) {
+               } else if (startswith(line, "Active:")) {
                        snprintf(lbuf, 100, "Active:         %8lu kB\n",
                                        active_anon + active_file);
                        printme = lbuf;
-               } else if (startswith(line, "Inactive")) {
+               } else if (startswith(line, "Inactive:")) {
                        snprintf(lbuf, 100, "Inactive:       %8lu kB\n",
                                        inactive_anon + inactive_file);
                        printme = lbuf;
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to