aboutsummaryrefslogtreecommitdiffstats
path: root/dragonflybsd/DragonFlyBSDProcessList.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-09-15 08:00:01 +0200
committerDaniel Lange <DLange@git.local>2020-09-15 08:00:01 +0200
commit8e8165109aca4e3c2a8558653df088d674061c78 (patch)
treed68c91ced3a78c65be9ae262ea84676e73cac68d /dragonflybsd/DragonFlyBSDProcessList.c
parente9302ddfaeaad62b12bdd352958fb194a26f3c74 (diff)
parentf80394a20254938142011855f2954b3f63fe5909 (diff)
downloaddebian_htop-8e8165109aca4e3c2a8558653df088d674061c78.tar.gz
debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.tar.bz2
debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.zip
Update upstream source from tag 'upstream/3.0.2'
Update to upstream version '3.0.2' with Debian dir 26e1b8d7612e50e81b8325506c1ce54f71cba270
Diffstat (limited to 'dragonflybsd/DragonFlyBSDProcessList.c')
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.c54
1 files changed, 3 insertions, 51 deletions
diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c
index 5bc4b38..cd5526a 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.c
+++ b/dragonflybsd/DragonFlyBSDProcessList.c
@@ -21,54 +21,6 @@ in the source distribution for its full text.
#include <string.h>
#include <sys/param.h>
-/*{
-
-#include <kvm.h>
-#include <sys/param.h>
-#include <osreldate.h>
-#include <sys/kinfo.h>
-#include <kinfo.h>
-#include <sys/jail.h>
-#include <sys/uio.h>
-#include <sys/resource.h>
-#include "Hashtable.h"
-#include "DragonFlyBSDProcess.h"
-
-#define JAIL_ERRMSGLEN 1024
-char jail_errmsg[JAIL_ERRMSGLEN];
-
-typedef struct CPUData_ {
-
- double userPercent;
- double nicePercent;
- double systemPercent;
- double irqPercent;
- double idlePercent;
- double systemAllPercent;
-
-} CPUData;
-
-typedef struct DragonFlyBSDProcessList_ {
- ProcessList super;
- kvm_t* kd;
-
- unsigned long long int memWire;
- unsigned long long int memActive;
- unsigned long long int memInactive;
- unsigned long long int memFree;
-
- CPUData* cpus;
-
- unsigned long *cp_time_o;
- unsigned long *cp_time_n;
-
- unsigned long *cp_times_o;
- unsigned long *cp_times_n;
-
- Hashtable *jails;
-} DragonFlyBSDProcessList;
-
-}*/
#define _UNUSED_ __attribute__((unused))
@@ -89,12 +41,12 @@ static int MIB_kern_cp_time[2];
static int MIB_kern_cp_times[2];
static int kernelFScale;
-ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) {
+ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) {
size_t len;
char errbuf[_POSIX2_LINE_MAX];
DragonFlyBSDProcessList* dfpl = xCalloc(1, sizeof(DragonFlyBSDProcessList));
ProcessList* pl = (ProcessList*) dfpl;
- ProcessList_init(pl, Class(DragonFlyBSDProcess), usersTable, pidWhiteList, userId);
+ ProcessList_init(pl, Class(DragonFlyBSDProcess), usersTable, pidMatchList, userId);
// physical memory in system: hw.physmem
// physical page size: hw.pagesize
@@ -145,7 +97,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
sysctl(MIB_kern_cp_times, 2, dfpl->cp_times_o, &len, NULL, 0);
}
- pl->cpuCount = MAX(cpus, 1);
+ pl->cpuCount = MAXIMUM(cpus, 1);
if (cpus == 1 ) {
dfpl->cpus = xRealloc(dfpl->cpus, sizeof(CPUData));

© 2014-2024 Faster IT GmbH | imprint | privacy policy