svn commit: r334754 - head/sbin/nvmecontrol
Justin Hibbits
jhibbits at FreeBSD.org
Thu Jun 7 04:03:00 UTC 2018
Author: jhibbits
Date: Thu Jun 7 04:02:09 2018
New Revision: 334754
URL: https://svnweb.freebsd.org/changeset/base/334754
Log:
Print Maximum Data Transfer Size as a long rather than int
PowerPC has PAGE_SIZE as a long, not an int. This causes the compiler to throw
a format mismatch warning on this print. To work around the difference, print
it as a long instead of an int, and force the argument to a long.
Reviewed By: imp
Differential Revision: https://reviews.freebsd.org/D15653
Modified:
head/sbin/nvmecontrol/identify.c
Modified: head/sbin/nvmecontrol/identify.c
==============================================================================
--- head/sbin/nvmecontrol/identify.c Thu Jun 7 03:19:21 2018 (r334753)
+++ head/sbin/nvmecontrol/identify.c Thu Jun 7 04:02:09 2018 (r334754)
@@ -119,7 +119,7 @@ print_controller(struct nvme_controller_data *cdata)
if (cdata->mdts == 0)
printf("Unlimited\n");
else
- printf("%d\n", PAGE_SIZE * (1 << cdata->mdts));
+ printf("%ld\n", PAGE_SIZE * (1L << cdata->mdts));
printf("Controller ID: 0x%02x\n", cdata->ctrlr_id);
printf("Version: %d.%d.%d\n",
(cdata->ver >> 16) & 0xffff, (cdata->ver >> 8) & 0xff,
More information about the svn-src-all
mailing list