Use err(3). Put includes in alphabetical order. Use .An macro.

This commit is contained in:
Philippe Charnier 1997-09-22 06:30:04 +00:00
parent ca6e514c81
commit 71b906885d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29707
2 changed files with 16 additions and 13 deletions

View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: kernbb.8,v 1.4 1997/02/22 16:06:05 peter Exp $
.\" $Id: kernbb.8,v 1.5 1997/08/14 10:36:00 phk Exp $
.\"
.Dd May 22, 1995
.Dt KERNBB 8
@ -65,4 +65,6 @@ the default memory
.Sh AUTHORS
The
.Nm
command was written by Poul-Henning Kamp, along with the kernel-support.
command was written by
.An Poul-Henning Kamp ,
along with the kernel-support.

View File

@ -6,17 +6,20 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: kernbb.c,v 1.7 1997/08/14 10:36:02 phk Exp $
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#ifndef lint
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <err.h>
#include <fcntl.h>
#include <kvm.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define MAXBB 32768
@ -71,11 +74,9 @@ main()
kvm_read(kv,l3,&bb,sizeof bb);
if (!bb.ncounts)
continue;
if (bb.ncounts > MAXBB) {
fprintf(stderr,"found %lu counts above limit of %u\n",
if (bb.ncounts > MAXBB)
errx(1, "found %lu counts above limit of %u",
bb.ncounts, MAXBB);
exit (1);
}
kvm_read(kv,bb.lineno,lineno, bb.ncounts * sizeof lineno[0]);
kvm_read(kv,bb.counts,counts, bb.ncounts * sizeof counts[0]);
kvm_read(kv,bb.addr, addr, bb.ncounts * sizeof addr[0]);