mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
Filter leading colons in CGROUP name
This commit is contained in:
parent
1c3c149d20
commit
ea4282784d
@ -872,9 +872,16 @@ static void LinuxProcessList_readCGroupFile(LinuxProcess* process, openat_arg_t
|
||||
if (!ok)
|
||||
break;
|
||||
|
||||
char* group = strchr(buffer, ':');
|
||||
if (!group)
|
||||
break;
|
||||
char* group = buffer;
|
||||
for (size_t i = 0; i < 2; i++) {
|
||||
group = strchrnul(group, ':');
|
||||
if (!*group)
|
||||
break;
|
||||
group++;
|
||||
}
|
||||
|
||||
char* eol = strchrnul(group, '\n');
|
||||
*eol = '\0';
|
||||
|
||||
if (at != output) {
|
||||
*at = ';';
|
||||
|
Loading…
Reference in New Issue
Block a user