diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2017-07-10 20:57:34 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2017-07-10 20:57:34 -0300 |
commit | e940aecfb9c51371d412230431339d2d124eeb81 (patch) | |
tree | 785e434425401957a10f11bdbdc37801bbec87e3 /Process.c | |
parent | 1a178ad5816f954a73ccf2fec2c41a5d3cab2cae (diff) |
Add "no perm" status when other fields fail due to lack of permission.
Thanks @Sworddragon for the heads up.
See #88.
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -262,7 +262,10 @@ void Process_colorNumber(RichString* str, unsigned long long number, bool colori processShadowColor = CRT_colors[PROCESS]; } - if (number > 10000000000) { + if ((long long) number == -1LL) { + int len = snprintf(buffer, 13, " no perm "); + RichString_appendn(str, CRT_colors[PROCESS_SHADOW], buffer, len); + } else if (number > 10000000000) { snprintf(buffer, 13, "%11lld ", number / 1000); RichString_appendn(str, largeNumberColor, buffer, 5); RichString_appendn(str, processMegabytesColor, buffer+5, 3); |