mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Interpret TTY_NR column on Linux,
translate dev_t to major:minor on other platforms. Closes #316.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user