Fix the 'w' command so that the -h option correctly supresses the heading

as per the manual page. Closes PR578.
Reviewed by:
Submitted by:	Kenneth D. Merry
Obtained from:
This commit is contained in:
Peter Wemm 1995-07-17 04:38:30 +00:00
parent 55cc991796
commit 0812a2b446
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9555

View File

@ -217,11 +217,11 @@ main(argc, argv)
pr_header(&now, nusers);
if (wcmd == 0)
exit (0);
}
#define HEADER "USER TTY FROM LOGIN@ IDLE WHAT\n"
#define WUSED (sizeof (HEADER) - sizeof ("WHAT\n"))
(void)printf(HEADER);
(void)printf(HEADER);
}
if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL)
err(1, "%s", kvm_geterr(kd));