mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters. David Greenman pointed out that when a process that had been revoked from it's controlling tty, the "-" sign was detached from any two-character names.
This commit is contained in:
parent
6c45f39e40
commit
c55931c759
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11021
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: keyword.c,v 1.5 1994/10/02 08:33:28 davidg Exp $
|
||||
* $Id: keyword.c,v 1.6 1995/09/04 01:22:40 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -161,7 +161,7 @@ VAR var[] = {
|
||||
{"tpgid", "TPGID", NULL, 0, evar, 4, EOFF(e_tpgid), ULONG, PIDFMT},
|
||||
{"tsess", "TSESS", NULL, 0, evar, 6, EOFF(e_tsess), KPTR, "x"},
|
||||
{"tsiz", "TSIZ", NULL, 0, tsize, 4},
|
||||
{"tt", "TT", NULL, LJUST, tname, 4},
|
||||
{"tt", "TT ", NULL, 0, tname, 4},
|
||||
{"tty", "TTY", NULL, LJUST, longtname, 8},
|
||||
{"ucomm", "UCOMM", NULL, LJUST, ucomm, MAXCOMLEN},
|
||||
{"uid", "UID", NULL, 0, evar, UIDLEN, EOFF(e_ucred.cr_uid),
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: print.c,v 1.8 1995/08/07 19:17:39 wollman Exp $
|
||||
* $Id: print.c,v 1.9 1995/09/04 01:22:41 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -322,12 +322,12 @@ tname(k, ve)
|
||||
v = ve->var;
|
||||
dev = KI_EPROC(k)->e_tdev;
|
||||
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
|
||||
(void)printf("%-*s", v->width, "??");
|
||||
(void)printf("%*s ", v->width-1, "??");
|
||||
else {
|
||||
if (strncmp(ttname, "tty", 3) == 0 ||
|
||||
strncmp(ttname, "cua", 3) == 0)
|
||||
ttname += 3;
|
||||
(void)printf("%-*.*s%c", v->width-1, v->width-1, ttname,
|
||||
(void)printf("%*.*s%c", v->width-1, v->width-1, ttname,
|
||||
KI_EPROC(k)->e_flag & EPROC_CTTY ? ' ' : '-');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user