Commit 10964ddc authored by Jay Lan's avatar Jay Lan Committed by Greg Kroah-Hartman

kdb: fix incorrect counts in KDB summary command output

commit 14675592 upstream.

The output of KDB 'summary' command should report MemTotal, MemFree
and Buffers output in kB. Current codes report in unit of pages.

A define of K(x) as
is defined in the code, but not used.

This patch would apply the define to convert the values to kB.
Please include me on Cc on replies. I do not subscribe to linux-kernel.
Signed-off-by: default avatarJay Lan <jlan@sgi.com>
Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7dd78f5a
...@@ -2583,7 +2583,7 @@ static int kdb_summary(int argc, const char **argv) ...@@ -2583,7 +2583,7 @@ static int kdb_summary(int argc, const char **argv)
#define K(x) ((x) << (PAGE_SHIFT - 10)) #define K(x) ((x) << (PAGE_SHIFT - 10))
kdb_printf("\nMemTotal: %8lu kB\nMemFree: %8lu kB\n" kdb_printf("\nMemTotal: %8lu kB\nMemFree: %8lu kB\n"
"Buffers: %8lu kB\n", "Buffers: %8lu kB\n",
val.totalram, val.freeram, val.bufferram); K(val.totalram), K(val.freeram), K(val.bufferram));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment