summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2016-01-18 12:02:05 +0000
committersmh <smh@FreeBSD.org>2016-01-18 12:02:05 +0000
commit0107aadb82e37e90347f8f0992b7a06d79fb9f2c (patch)
tree451ccee13081083b512d38ad79444a2a04e0d7c2
parent14041097a6eaac17653858641567006b866209e4 (diff)
downloadFreeBSD-src-0107aadb82e37e90347f8f0992b7a06d79fb9f2c.zip
FreeBSD-src-0107aadb82e37e90347f8f0992b7a06d79fb9f2c.tar.gz
Fix EFI_DEBUG option
Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works. MFC after: 2 weeks X-MFC-With: r293268 Sponsored by: Multiplay
-rw-r--r--sys/boot/efi/boot1/Makefile3
-rw-r--r--sys/boot/efi/boot1/boot_module.h7
-rw-r--r--sys/boot/efi/boot1/zfs_module.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/boot/efi/boot1/Makefile b/sys/boot/efi/boot1/Makefile
index 6b1ea8d..7c983e3 100644
--- a/sys/boot/efi/boot1/Makefile
+++ b/sys/boot/efi/boot1/Makefile
@@ -33,6 +33,9 @@ CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -DEFI_UFS_BOOT
+.ifdef(EFI_DEBUG)
+CFLAGS+= -DEFI_DEBUG
+.endif
.if ${MK_ZFS} != "no"
CFLAGS+= -I${.CURDIR}/../../zfs/
diff --git a/sys/boot/efi/boot1/boot_module.h b/sys/boot/efi/boot1/boot_module.h
index 1d07295..2c158f6 100644
--- a/sys/boot/efi/boot1/boot_module.h
+++ b/sys/boot/efi/boot1/boot_module.h
@@ -36,12 +36,9 @@
#include <eficonsctl.h>
#ifdef EFI_DEBUG
-#define DPRINTF(fmt, args...) \
- do { \
- printf(fmt, ##args) \
- } while (0)
+#define DPRINTF(fmt, ...) printf(fmt, __VA_ARGS__)
#else
-#define DPRINTF(fmt, args...) {}
+#define DPRINTF(fmt, ...) {}
#endif
/* EFI device info */
diff --git a/sys/boot/efi/boot1/zfs_module.c b/sys/boot/efi/boot1/zfs_module.c
index 345d0e1..96eec33 100644
--- a/sys/boot/efi/boot1/zfs_module.c
+++ b/sys/boot/efi/boot1/zfs_module.c
@@ -53,9 +53,9 @@ vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes)
status = devinfo->dev->ReadBlocks(devinfo->dev,
devinfo->dev->Media->MediaId, lba, bytes, buf);
if (status != EFI_SUCCESS) {
- DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %lu, size: %d,"
+ DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %zu, size: %zu,"
" status: %lu\n", devinfo->dev,
- devinfo->dev->Media->MediaId, lba, size,
+ devinfo->dev->Media->MediaId, lba, bytes,
EFI_ERROR_CODE(status));
return (-1);
}
OpenPOWER on IntegriCloud