summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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