diff options
author | charnier <charnier@FreeBSD.org> | 1997-09-22 06:30:04 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-09-22 06:30:04 +0000 |
commit | 466aa2b87a5a8150133c781ce5cd17d26e77ec07 (patch) | |
tree | e4b6950ad21c41b14a9cec75753121452780c22f /usr.sbin | |
parent | 1a8283e614e3a317cf6efe6a4809ecfb1483bf67 (diff) | |
download | FreeBSD-src-466aa2b87a5a8150133c781ce5cd17d26e77ec07.zip FreeBSD-src-466aa2b87a5a8150133c781ce5cd17d26e77ec07.tar.gz |
Use err(3). Put includes in alphabetical order. Use .An macro.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/kernbb/kernbb.8 | 6 | ||||
-rw-r--r-- | usr.sbin/kernbb/kernbb.c | 21 |
2 files changed, 15 insertions, 12 deletions
diff --git a/usr.sbin/kernbb/kernbb.8 b/usr.sbin/kernbb/kernbb.8 index 73acfae..e1cfd1e 100644 --- a/usr.sbin/kernbb/kernbb.8 +++ b/usr.sbin/kernbb/kernbb.8 @@ -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. diff --git a/usr.sbin/kernbb/kernbb.c b/usr.sbin/kernbb/kernbb.c index 72a8ef7..a67d5ba 100644 --- a/usr.sbin/kernbb/kernbb.c +++ b/usr.sbin/kernbb/kernbb.c @@ -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 $ - * */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + +#include <err.h> +#include <fcntl.h> +#include <kvm.h> #include <stdio.h> #include <stdlib.h> -#include <unistd.h> #include <string.h> -#include <fcntl.h> -#include <kvm.h> -#include <err.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]); |