]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Fix printf format to allow for bus_size_t not being u_long on all platforms.
authorian <ian@FreeBSD.org>
Tue, 20 Oct 2015 03:25:17 +0000 (03:25 +0000)
committerian <ian@FreeBSD.org>
Tue, 20 Oct 2015 03:25:17 +0000 (03:25 +0000)
sys/kern/subr_busdma_bufalloc.c

index b0b1ba826d48ded0dda553a8adbe13f18244f133..c8980e1a52d787dcf8cb9ce0247b188495486fb9 100644 (file)
@@ -94,8 +94,8 @@ busdma_bufalloc_create(const char *name, bus_size_t minimum_alignment,
        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);