From 08d6e253011889264d095fdd72e57c2c4c83cfc6 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Thu, 26 Nov 2020 19:56:10 +0100 Subject: [PATCH] Distinguish display of no permissions for reading M_LRS --- linux/LinuxProcess.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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;