[U-Boot] [RFC PATCH v2 17/20] fastboot: Guard getvar:partition-type/size with MMC

Alex Kiernan alex.kiernan at gmail.com
Mon Apr 30 08:32:51 UTC 2018


Add guard for partition-type/size against MMC as we need that in order
to lookup partitions.

Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
---

Changes in v2: None

 drivers/fastboot/fb_getvar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index aa68371..7989a19 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -55,6 +55,7 @@ void fb_getvar(char *cmd_parameter, char *response)
 			fastboot_okay("yes", response);
 		else
 			fastboot_okay("no", response);
+#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
 	} else if (!strcmp_l1("partition-type", cmd_parameter) ||
 		   !strcmp_l1("partition-size", cmd_parameter)) {
 		disk_partition_t part_info;
@@ -74,6 +75,7 @@ void fb_getvar(char *cmd_parameter, char *response)
 			fastboot_response("OKAY", response,
 					  "0x%016x", (int)part_info.size);
 		}
+#endif
 	} else {
 #define FASTBOOT_ENV_PREFIX	"fastboot."
 		char envstr[FASTBOOT_RESPONSE_LEN];
-- 
2.7.4



More information about the U-Boot mailing list