mirror of https://github.com/xzeldon/htop.git
DragonFlyBSD: Indentation and formatting fixes
This commit is contained in:
parent
ee9e7edbc1
commit
2c8353e7cf
|
@ -295,6 +295,7 @@ static inline void DragonFlyBSDProcessList_scanJails(DragonFlyBSDProcessList* df
|
||||||
if (sysctlbyname("jail.list", NULL, &len, NULL, 0) == -1) {
|
if (sysctlbyname("jail.list", NULL, &len, NULL, 0) == -1) {
|
||||||
CRT_fatalError("initial sysctlbyname / jail.list failed");
|
CRT_fatalError("initial sysctlbyname / jail.list failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -312,11 +313,13 @@ retry:
|
||||||
if (dfpl->jails) {
|
if (dfpl->jails) {
|
||||||
Hashtable_delete(dfpl->jails);
|
Hashtable_delete(dfpl->jails);
|
||||||
}
|
}
|
||||||
|
|
||||||
dfpl->jails = Hashtable_new(20, true);
|
dfpl->jails = Hashtable_new(20, true);
|
||||||
curpos = jls;
|
curpos = jls;
|
||||||
while (curpos) {
|
while (curpos) {
|
||||||
int jailid;
|
int jailid;
|
||||||
char* str_hostname;
|
char* str_hostname;
|
||||||
|
|
||||||
nextpos = strchr(curpos, '\n');
|
nextpos = strchr(curpos, '\n');
|
||||||
if (nextpos) {
|
if (nextpos) {
|
||||||
*nextpos++ = 0;
|
*nextpos++ = 0;
|
||||||
|
@ -346,6 +349,7 @@ static char* DragonFlyBSDProcessList_readJailName(DragonFlyBSDProcessList* dfpl,
|
||||||
} else {
|
} else {
|
||||||
jname = xStrdup("-");
|
jname = xStrdup("-");
|
||||||
}
|
}
|
||||||
|
|
||||||
return jname;
|
return jname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,23 +514,21 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
|
||||||
default: proc->state = '?';
|
default: proc->state = '?';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kproc->kp_flags & P_SWAPPEDOUT) {
|
if (kproc->kp_flags & P_SWAPPEDOUT)
|
||||||
proc->state = 'W';
|
proc->state = 'W';
|
||||||
}
|
if (kproc->kp_flags & P_TRACED)
|
||||||
if (kproc->kp_flags & P_TRACED) {
|
|
||||||
proc->state = 'T';
|
proc->state = 'T';
|
||||||
}
|
if (kproc->kp_flags & P_JAILED)
|
||||||
if (kproc->kp_flags & P_JAILED) {
|
|
||||||
proc->state = 'J';
|
proc->state = 'J';
|
||||||
}
|
|
||||||
|
|
||||||
if (Process_isKernelThread(dfp)) {
|
if (Process_isKernelThread(dfp))
|
||||||
super->kernelThreads++;
|
super->kernelThreads++;
|
||||||
}
|
|
||||||
|
|
||||||
super->totalTasks++;
|
super->totalTasks++;
|
||||||
|
|
||||||
if (proc->state == 'R')
|
if (proc->state == 'R')
|
||||||
super->runningTasks++;
|
super->runningTasks++;
|
||||||
|
|
||||||
proc->updated = true;
|
proc->updated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue