From owner-svn-src-head@freebsd.org Mon Jan 18 12:02:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA852A87094; Mon, 18 Jan 2016 12:02:06 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1231D25; Mon, 18 Jan 2016 12:02:06 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IC25Fa041361; Mon, 18 Jan 2016 12:02:05 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IC25qG041358; Mon, 18 Jan 2016 12:02:05 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201601181202.u0IC25qG041358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 18 Jan 2016 12:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294265 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2016 12:02:07 -0000 Author: smh Date: Mon Jan 18 12:02:05 2016 New Revision: 294265 URL: https://svnweb.freebsd.org/changeset/base/294265 Log: 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 Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/boot1/boot_module.h head/sys/boot/efi/boot1/zfs_module.c Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Mon Jan 18 11:51:41 2016 (r294264) +++ head/sys/boot/efi/boot1/Makefile Mon Jan 18 12:02:05 2016 (r294265) @@ -33,6 +33,9 @@ CFLAGS+= -I${.CURDIR}/../include/${MACHI 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/ Modified: head/sys/boot/efi/boot1/boot_module.h ============================================================================== --- head/sys/boot/efi/boot1/boot_module.h Mon Jan 18 11:51:41 2016 (r294264) +++ head/sys/boot/efi/boot1/boot_module.h Mon Jan 18 12:02:05 2016 (r294265) @@ -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 */ Modified: head/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- head/sys/boot/efi/boot1/zfs_module.c Mon Jan 18 11:51:41 2016 (r294264) +++ head/sys/boot/efi/boot1/zfs_module.c Mon Jan 18 12:02:05 2016 (r294265) @@ -53,9 +53,9 @@ vdev_read(vdev_t *vdev, void *priv, off_ 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); }