From 0107aadb82e37e90347f8f0992b7a06d79fb9f2c Mon Sep 17 00:00:00 2001 From: smh Date: Mon, 18 Jan 2016 12:02:05 +0000 Subject: 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 --- sys/boot/efi/boot1/Makefile | 3 +++ sys/boot/efi/boot1/boot_module.h | 7 ++----- sys/boot/efi/boot1/zfs_module.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/boot/efi/boot1') 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 #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); } -- cgit v1.1