svn commit: r212171 - stable/8/sys/kern
Jaakko Heinonen
jh at FreeBSD.org
Fri Sep 3 06:30:12 UTC 2010
Author: jh
Date: Fri Sep 3 06:30:11 2010
New Revision: 212171
URL: http://svn.freebsd.org/changeset/base/212171
Log:
MFC r209256, r209549, r209816, r209844:
- Fix compilation of the subr_unit.c user space test program.
- Use %zu for size_t in a few format strings.
- Correct a comment typo.
- Assert that low and high are >= 0 in new_unrhdr().
Modified:
stable/8/sys/kern/subr_unit.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/kern/subr_unit.c
==============================================================================
--- stable/8/sys/kern/subr_unit.c Fri Sep 3 03:56:09 2010 (r212170)
+++ stable/8/sys/kern/subr_unit.c Fri Sep 3 06:30:11 2010 (r212171)
@@ -153,6 +153,7 @@ mtx_assert(struct mtx *mp, int flag)
}
#define CTASSERT(foo)
+#define WITNESS_WARN(flags, lock, fmt, ...) (void)0
#endif /* USERLAND */
@@ -317,7 +318,7 @@ clean_unrhdr(struct unrhdr *uh)
/*
* Allocate a new unrheader set.
*
- * Highest and lowest valid values given as paramters.
+ * Highest and lowest valid values given as parameters.
*/
struct unrhdr *
@@ -325,8 +326,8 @@ new_unrhdr(int low, int high, struct mtx
{
struct unrhdr *uh;
- KASSERT(low <= high,
- ("UNR: use error: new_unrhdr(%u, %u)", low, high));
+ KASSERT(low >= 0 && low <= high,
+ ("UNR: use error: new_unrhdr(%d, %d)", low, high));
uh = Malloc(sizeof *uh);
if (mutex != NULL)
uh->mtx = mutex;
@@ -825,9 +826,9 @@ main(int argc __unused, const char **arg
memset(a, 0, sizeof a);
- fprintf(stderr, "sizeof(struct unr) %d\n", sizeof (struct unr));
- fprintf(stderr, "sizeof(struct unrb) %d\n", sizeof (struct unrb));
- fprintf(stderr, "sizeof(struct unrhdr) %d\n", sizeof (struct unrhdr));
+ fprintf(stderr, "sizeof(struct unr) %zu\n", sizeof(struct unr));
+ fprintf(stderr, "sizeof(struct unrb) %zu\n", sizeof(struct unrb));
+ fprintf(stderr, "sizeof(struct unrhdr) %zu\n", sizeof(struct unrhdr));
fprintf(stderr, "NBITS %d\n", NBITS);
x = 1;
for (m = 0; m < NN * 100; m++) {
More information about the svn-src-stable-8
mailing list