From owner-svn-src-stable-8@FreeBSD.ORG Fri Sep 3 06:30:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C3E1065882; Fri, 3 Sep 2010 06:30:12 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 439998FC1F; Fri, 3 Sep 2010 06:30:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o836UCvr035855; Fri, 3 Sep 2010 06:30:12 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o836UCOG035853; Fri, 3 Sep 2010 06:30:12 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201009030630.o836UCOG035853@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 3 Sep 2010 06:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212171 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2010 06:30:12 -0000 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++) {