mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 04:04:35 +03:00
Drop cgroup conditional
cgroup is only checked on runtime if the column CGROUP is selected. cgroup is currently disabled by default, but most distributions do enable it. Drop the cgroup configuration switch, to reduce the maintenance cost.
This commit is contained in:

committed by
cgzones

parent
267014cbfe
commit
c88c80e3bd
@ -644,8 +644,6 @@ static void LinuxProcessList_readOpenVZData(LinuxProcess* process, const char* d
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CGROUP
|
||||
|
||||
static void LinuxProcessList_readCGroupFile(LinuxProcess* process, const char* dirname, const char* name) {
|
||||
char filename[MAX_NAME + 1];
|
||||
xSnprintf(filename, MAX_NAME, "%s/%s/cgroup", dirname, name);
|
||||
@ -684,8 +682,6 @@ static void LinuxProcessList_readCGroupFile(LinuxProcess* process, const char* d
|
||||
process->cgroup = xStrdup(output);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VSERVER
|
||||
|
||||
static void LinuxProcessList_readVServerData(LinuxProcess* process, const char* dirname, const char* name) {
|
||||
@ -1294,11 +1290,9 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
|
||||
LinuxProcessList_readDelayAcctData(this, lp);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CGROUP
|
||||
if (settings->flags & PROCESS_FLAG_LINUX_CGROUP) {
|
||||
LinuxProcessList_readCGroupFile(lp, dirname, name);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (settings->flags & PROCESS_FLAG_LINUX_OOM) {
|
||||
LinuxProcessList_readOomData(lp, dirname, name);
|
||||
|
Reference in New Issue
Block a user