fix length of pss for '-s <pid>' 68/243668/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 9 Sep 2020 04:20:09 +0000 (13:20 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 9 Sep 2020 04:20:18 +0000 (13:20 +0900)
The pss is printed with 18 length space for '-s <pid>' but it is
too long. Fix the length of pss as 8 like other options.

Change-Id: Ic41a1e106ae86efe2c4bc40ba4a45a1e5a6403a7
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
memps.c

diff --git a/memps.c b/memps.c
index 4709428..5a7bfa6 100644 (file)
--- a/memps.c
+++ b/memps.c
@@ -1293,10 +1293,8 @@ static int show_map_new(int pid)
                printf("-------- -------- -------- -------- -------- "
                        "----------------- ------------------------------\n");
        } else {
-               printf(" S(CODE)  S(DATA)  P(CODE)  P(DATA) "
-                       "               PSS\n");
-               printf("-------- -------- -------- -------- "
-                       "------------------\n");
+               printf(" S(CODE)  S(DATA)  P(CODE)  P(DATA)      PSS\n");
+               printf("-------- -------- -------- -------- --------\n");
        }
        for (mi = milist; mi;) {
                shared_clean += mi->shared_clean;
@@ -1346,7 +1344,7 @@ static int show_map_new(int pid)
                temp = NULL;
        }
        if (sum) {
-               printf("%8d %8d %8d %8d %18d\n",
+               printf("%8d %8d %8d %8d %8d\n",
                       shared_clean_total,
                       shared_dirty_total,
                       private_clean_total,