aboutsummaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-09-15 08:00:00 +0200
committerDaniel Lange <DLange@git.local>2020-09-15 08:00:00 +0200
commitf80394a20254938142011855f2954b3f63fe5909 (patch)
treeb777de460977f21a6257540d6a687c86882850dc /htop.c
parent59eeadec918a955b40427a1b012992161050c939 (diff)
downloaddebian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.gz
debian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.bz2
debian_htop-f80394a20254938142011855f2954b3f63fe5909.zip
New upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/htop.c b/htop.c
index bbf3a91..2cf2602 100644
--- a/htop.c
+++ b/htop.c
@@ -57,7 +57,7 @@ static void printHelpFlag() {
// ----------------------------------------
typedef struct CommandLineSettings_ {
- Hashtable* pidWhiteList;
+ Hashtable* pidMatchList;
uid_t userId;
int sortKey;
int delay;
@@ -70,7 +70,7 @@ typedef struct CommandLineSettings_ {
static CommandLineSettings parseArguments(int argc, char** argv) {
CommandLineSettings flags = {
- .pidWhiteList = NULL,
+ .pidMatchList = NULL,
.userId = -1, // -1 is guaranteed to be an invalid uid_t (see setreuid(2))
.sortKey = 0,
.delay = -1,
@@ -98,7 +98,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
int opt, opti=0;
/* Parse arguments */
- while ((opt = getopt_long(argc, argv, "hvmCs:td:u:Up:", long_opts, &opti))) {
+ while ((opt = getopt_long(argc, argv, "hvmCs:td:u::Up:", long_opts, &opti))) {
if (opt == EOF) break;
switch (opt) {
case 'h':
@@ -163,13 +163,13 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
char* saveptr;
char* pid = strtok_r(argCopy, ",", &saveptr);
- if(!flags.pidWhiteList) {
- flags.pidWhiteList = Hashtable_new(8, false);
+ if(!flags.pidMatchList) {
+ flags.pidMatchList = Hashtable_new(8, false);
}
while(pid) {
unsigned int num_pid = atoi(pid);
- Hashtable_put(flags.pidWhiteList, num_pid, (void *) 1);
+ Hashtable_put(flags.pidMatchList, num_pid, (void *) 1);
pid = strtok_r(NULL, ",", &saveptr);
}
free(argCopy);
@@ -215,7 +215,7 @@ int main(int argc, char** argv) {
Process_setupColumnWidths();
UsersTable* ut = UsersTable_new();
- ProcessList* pl = ProcessList_new(ut, flags.pidWhiteList, flags.userId);
+ ProcessList* pl = ProcessList_new(ut, flags.pidMatchList, flags.userId);
Settings* settings = Settings_new(pl->cpuCount);
pl->settings = settings;
@@ -281,8 +281,8 @@ int main(int argc, char** argv) {
UsersTable_delete(ut);
Settings_delete(settings);
- if(flags.pidWhiteList) {
- Hashtable_delete(flags.pidWhiteList);
+ if(flags.pidMatchList) {
+ Hashtable_delete(flags.pidMatchList);
}
return 0;
}

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