From a84623740cbcddc83d3ae0e49ad184b469302d78 Mon Sep 17 00:00:00 2001 From: billf Date: Sun, 4 Jul 1999 23:42:32 +0000 Subject: (1) Include linker.h because we use kldload() (2) Clear up an ambigious, nested if/else (3) Cast a ccio_size to a long and use the correct format identifier. Reviewed by: green --- sbin/ccdconfig/ccdconfig.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sbin/ccdconfig/ccdconfig.c') diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c index 95ae3d1..95318c9 100644 --- a/sbin/ccdconfig/ccdconfig.c +++ b/sbin/ccdconfig/ccdconfig.c @@ -34,10 +34,11 @@ #ifndef lint static const char rcsid[] = - "$Id: ccdconfig.c,v 1.11 1999/04/05 06:30:12 peter Exp $"; + "$Id: ccdconfig.c,v 1.12 1999/05/06 19:20:34 phk Exp $"; #endif /* not lint */ #include +#include #include #include #include @@ -228,7 +229,7 @@ do_single(argc, argv, action) } /* Make sure there are enough arguments. */ - if (argc < 4) + if (argc < 4) { if (argc == 3) { /* Assume that no flags are specified. */ noflags = 1; @@ -239,6 +240,7 @@ do_single(argc, argv, action) } else usage(); } + } /* First argument is the ccd to configure. */ cp = *argv++; --argc; @@ -304,7 +306,7 @@ do_single(argc, argv, action) i == 0 ? '(' : ' ', cp2, i == ccio.ccio_ndisks - 1 ? ')' : ','); } - printf(", %d blocks ", ccio.ccio_size); + printf(", %lu blocks ", (u_long)ccio.ccio_size); if (ccio.ccio_ileave != 0) printf("interleaved at %d blocks\n", ccio.ccio_ileave); else -- cgit v1.1