Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2013 21:20:58 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r247238 - projects/virtio/sys/dev/virtio
Message-ID:  <201302242120.r1OLKwbv091572@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Sun Feb 24 21:20:57 2013
New Revision: 247238
URL: http://svnweb.freebsd.org/changeset/base/247238

Log:
  virtio: Remove PRIx64 macros from format strings
  
  Approved by:	grehan (implicit)

Modified:
  projects/virtio/sys/dev/virtio/virtio.c

Modified: projects/virtio/sys/dev/virtio/virtio.c
==============================================================================
--- projects/virtio/sys/dev/virtio/virtio.c	Sun Feb 24 21:00:37 2013	(r247237)
+++ projects/virtio/sys/dev/virtio/virtio.c	Sun Feb 24 21:20:57 2013	(r247238)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
 
 #include <machine/bus.h>
 #include <machine/resource.h>
-#include <machine/_inttypes.h>
 #include <sys/bus.h>
 #include <sys/rman.h>
 
@@ -119,12 +118,12 @@ virtio_describe(device_t dev, const char
 	int n;
 
 	if ((buf = malloc(512, M_TEMP, M_NOWAIT)) == NULL) {
-		device_printf(dev, "%s features: 0x%"PRIx64"\n", msg, features);
+		device_printf(dev, "%s features: %#jx\n", msg, (uintmax_t) features);
 		return;
 	}
 
 	sbuf_new(&sb, buf, 512, SBUF_FIXEDLEN);
-	sbuf_printf(&sb, "%s features: 0x%"PRIx64, msg, features);
+	sbuf_printf(&sb, "%s features: %#jx", msg, (uintmax_t) features);
 
 	for (n = 0, val = 1ULL << 63; val != 0; val >>= 1) {
 		/*
@@ -141,7 +140,7 @@ virtio_describe(device_t dev, const char
 
 		name = virtio_feature_name(val, desc);
 		if (name == NULL)
-			sbuf_printf(&sb, "0x%"PRIx64, val);
+			sbuf_printf(&sb, "%#jx", (uintmax_t) val);
 		else
 			sbuf_cat(&sb, name);
 	}



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