diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-05-19 17:44:37 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-05-23 09:22:21 +0200 |
commit | 72724d42f3eba9e5257347c7f727c7d0c5521622 (patch) | |
tree | 7c270839d96c9bc2d5cf87c227eae72d87801355 /dragonflybsd/DragonFlyBSDProcess.c | |
parent | d445676f09fe723eb5ca5a60e371f6cc90991a9d (diff) |
DragonFlyBSD: add EXE and COMM columns and use merged command line helpers
Diffstat (limited to 'dragonflybsd/DragonFlyBSDProcess.c')
-rw-r--r-- | dragonflybsd/DragonFlyBSDProcess.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dragonflybsd/DragonFlyBSDProcess.c b/dragonflybsd/DragonFlyBSDProcess.c index aa91740d..662fb225 100644 --- a/dragonflybsd/DragonFlyBSDProcess.c +++ b/dragonflybsd/DragonFlyBSDProcess.c @@ -44,6 +44,8 @@ const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = { [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, .defaultSortDesc = true, }, [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, }, [TGID] = { .name = "TGID", .title = "TGID", .description = "Thread group ID (i.e. process ID)", .flags = 0, .pidColumn = true, }, + [PROC_COMM] = { .name = "COMM", .title = "COMM ", .description = "comm string of the process", .flags = 0, }, + [PROC_EXE] = { .name = "EXE", .title = "EXE ", .description = "Basename of exe of the process", .flags = 0, }, [JID] = { .name = "JID", .title = "JID", .description = "Jail prison ID", .flags = 0, .pidColumn = true, }, [JAIL] = { .name = "JAIL", .title = "JAIL ", .description = "Jail prison name", .flags = 0, }, }; @@ -69,7 +71,7 @@ static void DragonFlyBSDProcess_writeField(const Process* this, RichString* str, size_t n = sizeof(buffer) - 1; switch (field) { // add Platform-specific fields here - case PID: xSnprintf(buffer, n, "%*d ", Process_pidDigits, (fp->kernel ? -1 : this->pid)); break; + case PID: xSnprintf(buffer, n, "%*d ", Process_pidDigits, Process_isKernelThread(this) ? -1 : this->pid); break; case JID: xSnprintf(buffer, n, "%*d ", Process_pidDigits, fp->jid); break; case JAIL: Process_printLeftAlignedField(str, attr, fp->jname, 11); return; default: |