summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.h
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-10-01 03:09:04 -0300
committerHisham <hisham@gobolinux.org>2016-10-01 03:09:04 -0300
commit8af4d9f453ffa2209e486418811f7652822951c6 (patch)
tree432b6b39b0f9f7c746224370ccf438eea3495ac6 /linux/LinuxProcessList.h
parent8a147dd5b4bc35feebb14a3a55ee44186ce3cea4 (diff)
Interpret TTY_NR column on Linux,
translate dev_t to major:minor on other platforms. Closes #316.
Diffstat (limited to 'linux/LinuxProcessList.h')
-rw-r--r--linux/LinuxProcessList.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index 97725812..ce39f805 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -40,11 +40,19 @@ typedef struct CPUData_ {
unsigned long long int guestPeriod;
} CPUData;
+typedef struct TtyDriver_ {
+ char* path;
+ unsigned int major;
+ unsigned int minorFrom;
+ unsigned int minorTo;
+} TtyDriver;
+
typedef struct LinuxProcessList_ {
ProcessList super;
-
+
CPUData* cpus;
-
+ TtyDriver* ttyDrivers;
+
} LinuxProcessList;
#ifndef PROCDIR
@@ -59,6 +67,10 @@ typedef struct LinuxProcessList_ {
#define PROCMEMINFOFILE PROCDIR "/meminfo"
#endif
+#ifndef PROCTTYDRIVERSFILE
+#define PROCTTYDRIVERSFILE PROCDIR "/tty/drivers"
+#endif
+
#ifndef PROC_LINE_LENGTH
#define PROC_LINE_LENGTH 512
#endif
@@ -67,7 +79,7 @@ typedef struct LinuxProcessList_ {
#ifndef CLAMP
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
#endif
-
+
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
void ProcessList_delete(ProcessList* pl);

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