mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 20:24:35 +03:00
Linux: use correct column alignment for wide fields
This affects: - PROC_COMM, PROC_EXE and CWD on Linux - JAIL on FreeBSD and DragonFlyBSD - ZONE on Solaris
This commit is contained in:
@ -71,14 +71,9 @@ static void FreeBSDProcess_writeField(const Process* this, RichString* str, Proc
|
||||
switch (field) {
|
||||
// add FreeBSD-specific fields here
|
||||
case JID: xSnprintf(buffer, n, "%*d ", Process_pidDigits, fp->jid); break;
|
||||
case JAIL: {
|
||||
xSnprintf(buffer, n, "%-11s ", fp->jname);
|
||||
if (buffer[11] != '\0') {
|
||||
buffer[11] = ' ';
|
||||
buffer[12] = '\0';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case JAIL:
|
||||
Process_printLeftAlignedField(str, attr, fp->jname ? fp->jname : "N/A", 11);
|
||||
return;
|
||||
case TTY_NR:
|
||||
if (fp->ttyPath) {
|
||||
if (fp->ttyPath == nodevStr)
|
||||
|
@ -414,7 +414,7 @@ static char* FreeBSDProcessList_readJailName(const struct kinfo_proc* kproc) {
|
||||
char* jname = NULL;
|
||||
char jnamebuf[MAXHOSTNAMELEN];
|
||||
|
||||
if (kproc->ki_jid != 0 ) {
|
||||
if (kproc->ki_jid != 0) {
|
||||
struct iovec jiov[6];
|
||||
|
||||
memset(jnamebuf, 0, sizeof(jnamebuf));
|
||||
|
Reference in New Issue
Block a user