Linux: dynamically adjust the SECATTR column width

SELinux contexts can be quite long; adjust the column width dynamically
at each cycle to the longest value.

Also with the recent addition of multiple screens, over-long columns can
be moved into their own screen.
This commit is contained in:
Christian Göttsche
2021-12-04 19:57:47 +01:00
committed by BenBE
parent 6133cac721
commit 3ba695293c
5 changed files with 39 additions and 2 deletions

View File

@ -1029,6 +1029,9 @@ static void LinuxProcessList_readSecattrData(LinuxProcess* process, openat_arg_t
if (newline) {
*newline = '\0';
}
Process_updateFieldWidth(SECATTR, strlen(buffer));
if (process->secattr && String_eq(process->secattr, buffer)) {
return;
}