diff mbox series

[1/2] distro_bootcmd: make BOOTENV_DEV_NAME and BOOTENV_DEV macro variadic

Message ID 20200421192635.3289648-2-t.schramm@manjaro.org
State New
Headers show
Series Add sf SPI flash support to distro boot | expand

Commit Message

Tobias Schramm April 21, 2020, 7:26 p.m. UTC
Using a variadic macro allows boot device macros to take additional
arguments

Signed-off-by: Tobias Schramm <t.schramm at manjaro.org>
Cc: Patrick Wildt <patrick at blueri.se>
Cc: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 include/config_distro_bootcmd.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index fc0935fa21..aacfb309da 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -398,13 +398,13 @@ 
 	BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
 #endif
 
-#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance) \
-	BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance)
+#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance, ...) \
+	BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance, ##__VA_ARGS__)
 #define BOOTENV_BOOT_TARGETS \
 	"boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0"
 
-#define BOOTENV_DEV(devtypeu, devtypel, instance) \
-	BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
+#define BOOTENV_DEV(devtypeu, devtypel, instance, ...) \
+	BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance, ##__VA_ARGS__)
 #define BOOTENV \
 	BOOTENV_SHARED_HOST \
 	BOOTENV_SHARED_MMC \