diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-11-26 19:56:10 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2020-11-26 22:58:34 +0100 |
commit | 08d6e253011889264d095fdd72e57c2c4c83cfc6 (patch) | |
tree | 0d7b163318147eb1b72185e3dc34d1c986904ef6 | |
parent | 31044d1729109cc8c0cb6a1cf63eef0d8b0d1362 (diff) |
Distinguish display of no permissions for reading M_LRS
-rw-r--r-- | linux/LinuxProcess.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index 1dd30426..6de4874c 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -634,7 +634,15 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces case CMAJFLT: Process_colorNumber(str, lp->cmajflt, coloring); return; case M_DRS: Process_humanNumber(str, lp->m_drs * CRT_pageSizeKB, coloring); return; case M_DT: Process_humanNumber(str, lp->m_dt * CRT_pageSizeKB, coloring); return; - case M_LRS: Process_humanNumber(str, lp->m_lrs * CRT_pageSizeKB, coloring); return; + case M_LRS: + if (lp->m_lrs) { + Process_humanNumber(str, lp->m_lrs * CRT_pageSizeKB, coloring); + return; + } + + attr = CRT_colors[PROCESS_SHADOW]; + xSnprintf(buffer, n, " N/A "); + break; case M_TRS: Process_humanNumber(str, lp->m_trs * CRT_pageSizeKB, coloring); return; case M_SHARE: Process_humanNumber(str, lp->m_share * CRT_pageSizeKB, coloring); return; case M_PSS: Process_humanNumber(str, lp->m_pss, coloring); return; |