Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 2015 03:25:18 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289618 - head/sys/kern
Message-ID:  <201510200325.t9K3PIo3058640@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Tue Oct 20 03:25:17 2015
New Revision: 289618
URL: https://svnweb.freebsd.org/changeset/base/289618

Log:
  Fix printf format to allow for bus_size_t not being u_long on all platforms.

Modified:
  head/sys/kern/subr_busdma_bufalloc.c

Modified: head/sys/kern/subr_busdma_bufalloc.c
==============================================================================
--- head/sys/kern/subr_busdma_bufalloc.c	Tue Oct 20 01:54:52 2015	(r289617)
+++ head/sys/kern/subr_busdma_bufalloc.c	Tue Oct 20 03:25:17 2015	(r289618)
@@ -94,8 +94,8 @@ busdma_bufalloc_create(const char *name,
 	for (i = 0, bz = ba->buf_zones, cursize = ba->min_size;
 	    i < nitems(ba->buf_zones) && cursize <= MAX_ZONE_BUFSIZE;
 	    ++i, ++bz, cursize <<= 1) {
-		snprintf(bz->name, sizeof(bz->name), "dma %.10s %lu",
-		    name, cursize);
+		snprintf(bz->name, sizeof(bz->name), "dma %.10s %ju",
+		    name, (uintmax_t)cursize);
 		bz->size = cursize;
 		bz->umazone = uma_zcreate(bz->name, bz->size,
 		    NULL, NULL, NULL, NULL, bz->size - 1, zcreate_flags);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510200325.t9K3PIo3058640>