summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iostat/iostat.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-09-19 06:27:30 +0000
committercharnier <charnier@FreeBSD.org>1997-09-19 06:27:30 +0000
commite9cad8594ecde5c524e5aa90a7b69513faa56123 (patch)
tree6e1749663964b8ec44b12cc8ba18efd9534e2857 /usr.sbin/iostat/iostat.c
parent7220eb2a3ed5eb140e2432de82e7de6f9d2ed57d (diff)
downloadFreeBSD-src-e9cad8594ecde5c524e5aa90a7b69513faa56123.zip
FreeBSD-src-e9cad8594ecde5c524e5aa90a7b69513faa56123.tar.gz
Use err(3).
Diffstat (limited to 'usr.sbin/iostat/iostat.c')
-rw-r--r--usr.sbin/iostat/iostat.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index ab9b8db..d1531ea 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -32,13 +32,17 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1986, 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)iostat.c 8.2 (Berkeley) 1/26/94";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/param.h>
@@ -131,7 +135,7 @@ char **dr_name;
void cpustats __P((void));
void dkstats __P((void));
void phdr __P((int));
-void usage __P((void));
+static void usage __P((void));
int
main(argc, argv)
@@ -150,7 +154,7 @@ main(argc, argv)
switch(ch) {
case 'c':
if ((reps = atoi(optarg)) <= 0)
- errx(1, "repetition count <= 0.");
+ errx(1, "repetition count <= 0");
break;
case 'M':
memf = optarg;
@@ -160,7 +164,7 @@ main(argc, argv)
break;
case 'w':
if ((interval = atoi(optarg)) <= 0)
- errx(1, "interval <= 0.");
+ errx(1, "interval <= 0");
break;
case '?':
default:
@@ -185,7 +189,7 @@ main(argc, argv)
errx(1, "dk_ndrive not found in namelist");
(void)nlread(X_DK_NDRIVE, dk_ndrive);
if (dk_ndrive < 0)
- errx(1, "invalid dk_ndrive %d\n", dk_ndrive);
+ errx(1, "invalid dk_ndrive %d", dk_ndrive);
cur.dk_time = calloc(dk_ndrive, sizeof(long));
cur.dk_wds = calloc(dk_ndrive, sizeof(long));
@@ -386,7 +390,7 @@ cpustats()
100. * cur.cp_time[state] / (time ? time : 1));
}
-void
+static void
usage()
{
(void)fprintf(stderr,
OpenPOWER on IntegriCloud