mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 00:12:45 +00:00
Reduce number of spaces for full name by four, and reduce padding
after tty entry by one space in order to provide extra spaces for the tty entry. As a result, full pts names are now visible (up to 999 pts's anyway): Before: Login Name TTY Idle Login Time Office Phone robert Robert Watson *v0 3:55 Fri 02:54 robert Robert Watson p0 19 Sat 11:01 robert Robert Watson pts Sat 14:55 After: Login Name TTY Idle Login Time Office Phone robert Robert Watson *v0 5:08 Fri 02:54 robert Robert Watson p0 8 Sat 11:01 robert Robert Watson pts/5 Sat 14:55 MFC after: 1 week
This commit is contained in:
parent
0a0eb0e8db
commit
e0f5d997de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156282
@ -86,10 +86,10 @@ sflag_print(void)
|
|||||||
* else
|
* else
|
||||||
* remote host
|
* remote host
|
||||||
*/
|
*/
|
||||||
#define MAXREALNAME 20
|
#define MAXREALNAME 16
|
||||||
#define MAXHOSTNAME 17 /* in reality, hosts are never longer than 16 */
|
#define MAXHOSTNAME 17 /* in reality, hosts are never longer than 16 */
|
||||||
(void)printf("%-*s %-*s%s %s\n", UT_NAMESIZE, "Login", MAXREALNAME,
|
(void)printf("%-*s %-*s%s %s\n", UT_NAMESIZE, "Login", MAXREALNAME,
|
||||||
"Name", " TTY Idle Login Time ", (gflag) ? "" :
|
"Name", " TTY Idle Login Time ", (gflag) ? "" :
|
||||||
oflag ? "Office Phone" : "Where");
|
oflag ? "Office Phone" : "Where");
|
||||||
|
|
||||||
for (sflag = R_FIRST;; sflag = R_NEXT) {
|
for (sflag = R_FIRST;; sflag = R_NEXT) {
|
||||||
@ -115,12 +115,12 @@ sflag_print(void)
|
|||||||
(void)putchar(w->info == LOGGEDIN && !w->writable ?
|
(void)putchar(w->info == LOGGEDIN && !w->writable ?
|
||||||
'*' : ' ');
|
'*' : ' ');
|
||||||
if (*w->tty)
|
if (*w->tty)
|
||||||
(void)printf("%-3.3s ",
|
(void)printf("%-7.7s ",
|
||||||
(strncmp(w->tty, "tty", 3)
|
(strncmp(w->tty, "tty", 3)
|
||||||
&& strncmp(w->tty, "cua", 3))
|
&& strncmp(w->tty, "cua", 3))
|
||||||
? w->tty : w->tty + 3);
|
? w->tty : w->tty + 3);
|
||||||
else
|
else
|
||||||
(void)printf(" ");
|
(void)printf(" ");
|
||||||
if (w->info == LOGGEDIN) {
|
if (w->info == LOGGEDIN) {
|
||||||
stimeprint(w);
|
stimeprint(w);
|
||||||
(void)printf(" ");
|
(void)printf(" ");
|
||||||
|
Loading…
Reference in New Issue
Block a user