(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
This commit is contained in:
parent
e26b8fd66e
commit
9539436c36
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48568
@ -34,10 +34,11 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#include <sys/linker.h>
|
||||||
#include <sys/disklabel.h>
|
#include <sys/disklabel.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -228,7 +229,7 @@ do_single(argc, argv, action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure there are enough arguments. */
|
/* Make sure there are enough arguments. */
|
||||||
if (argc < 4)
|
if (argc < 4) {
|
||||||
if (argc == 3) {
|
if (argc == 3) {
|
||||||
/* Assume that no flags are specified. */
|
/* Assume that no flags are specified. */
|
||||||
noflags = 1;
|
noflags = 1;
|
||||||
@ -239,6 +240,7 @@ do_single(argc, argv, action)
|
|||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* First argument is the ccd to configure. */
|
/* First argument is the ccd to configure. */
|
||||||
cp = *argv++; --argc;
|
cp = *argv++; --argc;
|
||||||
@ -304,7 +306,7 @@ do_single(argc, argv, action)
|
|||||||
i == 0 ? '(' : ' ', cp2,
|
i == 0 ? '(' : ' ', cp2,
|
||||||
i == ccio.ccio_ndisks - 1 ? ')' : ',');
|
i == ccio.ccio_ndisks - 1 ? ')' : ',');
|
||||||
}
|
}
|
||||||
printf(", %d blocks ", ccio.ccio_size);
|
printf(", %lu blocks ", (u_long)ccio.ccio_size);
|
||||||
if (ccio.ccio_ileave != 0)
|
if (ccio.ccio_ileave != 0)
|
||||||
printf("interleaved at %d blocks\n", ccio.ccio_ileave);
|
printf("interleaved at %d blocks\n", ccio.ccio_ileave);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user