summaryrefslogtreecommitdiffstats
path: root/unsupported/UnsupportedProcessList.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-28 18:19:38 +0100
committercgzones <cgzones@googlemail.com>2021-01-29 14:12:44 +0100
commit3acf28c259f1a393badcc2e99c9646e19a911f98 (patch)
tree78ea9191604c1aca520d358af0927b2c007dbf78 /unsupported/UnsupportedProcessList.c
parentbd694c0ce60a60e29dc4ae22923f251fbd196332 (diff)
Unsupported: pass compilation
Diffstat (limited to 'unsupported/UnsupportedProcessList.c')
-rw-r--r--unsupported/UnsupportedProcessList.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c
index 098eb488..8bc42962 100644
--- a/unsupported/UnsupportedProcessList.c
+++ b/unsupported/UnsupportedProcessList.c
@@ -5,17 +5,21 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "ProcessList.h"
-#include "UnsupportedProcess.h"
+#include "UnsupportedProcessList.h"
#include <stdlib.h>
#include <string.h>
+#include "ProcessList.h"
+#include "UnsupportedProcess.h"
+
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) {
ProcessList* this = xCalloc(1, sizeof(ProcessList));
ProcessList_init(this, Class(Process), usersTable, pidMatchList, userId);
+ this->cpuCount = 1;
+
return this;
}
@@ -41,7 +45,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
proc->pid = 1;
proc->ppid = 1;
proc->tgid = 0;
- proc->comm = "<unsupported architecture>";
+ free_and_xStrdup(&proc->comm, "<unsupported architecture>");
proc->basenameOffset = 0;
proc->updated = true;
@@ -70,4 +74,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
proc->minflt = 20;
proc->majflt = 20;
+
+ if (!preExisting)
+ ProcessList_add(super, proc);
}

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