mirror of https://github.com/xzeldon/htop.git
Truncate overwide jail names on BSD.
This commit is contained in:
parent
402e46bb82
commit
fabe75685a
|
@ -121,7 +121,7 @@ void DragonFlyBSDProcess_writeField(Process* this, RichString* str, ProcessField
|
||||||
case PID: xSnprintf(buffer, n, Process_pidFormat, (fp->kernel ? -1 : this->pid)); break;
|
case PID: xSnprintf(buffer, n, Process_pidFormat, (fp->kernel ? -1 : this->pid)); break;
|
||||||
case JID: xSnprintf(buffer, n, Process_pidFormat, fp->jid); break;
|
case JID: xSnprintf(buffer, n, Process_pidFormat, fp->jid); break;
|
||||||
case JAIL:{
|
case JAIL:{
|
||||||
xSnprintf(buffer, n, "%-11s ", fp->jname); break;
|
xSnprintf(buffer, n, "%-11s ", fp->jname);
|
||||||
if (buffer[11] != '\0') {
|
if (buffer[11] != '\0') {
|
||||||
buffer[11] = ' ';
|
buffer[11] = ' ';
|
||||||
buffer[12] = '\0';
|
buffer[12] = '\0';
|
||||||
|
|
|
@ -119,7 +119,7 @@ void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
|
||||||
// add FreeBSD-specific fields here
|
// add FreeBSD-specific fields here
|
||||||
case JID: xSnprintf(buffer, n, Process_pidFormat, fp->jid); break;
|
case JID: xSnprintf(buffer, n, Process_pidFormat, fp->jid); break;
|
||||||
case JAIL:{
|
case JAIL:{
|
||||||
xSnprintf(buffer, n, "%-11s ", fp->jname); break;
|
xSnprintf(buffer, n, "%-11s ", fp->jname);
|
||||||
if (buffer[11] != '\0') {
|
if (buffer[11] != '\0') {
|
||||||
buffer[11] = ' ';
|
buffer[11] = ' ';
|
||||||
buffer[12] = '\0';
|
buffer[12] = '\0';
|
||||||
|
|
Loading…
Reference in New Issue