diff options
author | Jonathan Liu <net147@gmail.com> | 2019-10-06 16:22:04 +1100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-10-08 18:12:26 +0000 |
commit | 7f15de164c2b6fcb82fb9634d5d43a2368338ac3 (patch) | |
tree | 68bc0a0affb1705f828c6b956f007bb64cf5bb37 /libflashrom.c | |
parent | d58128eb83e59e09113666c80da81c891d76e949 (diff) | |
download | flashrom-7f15de164c2b6fcb82fb9634d5d43a2368338ac3.tar.gz flashrom-7f15de164c2b6fcb82fb9634d5d43a2368338ac3.tar.bz2 flashrom-7f15de164c2b6fcb82fb9634d5d43a2368338ac3.zip |
Fix compilation if CONFIG_INTERNAL=no
Change-Id: Id9e07332003832465a0eccf1d89e73d15abb35c0
Signed-off-by: Jonathan Liu <net147@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/35808
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'libflashrom.c')
-rw-r--r-- | libflashrom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libflashrom.c b/libflashrom.c index 1d8a9ae7e..0dec22ee5 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -170,6 +170,7 @@ struct flashrom_flashchip_info *flashrom_supported_flash_chips(void) */ struct flashrom_board_info *flashrom_supported_boards(void) { +#if CONFIG_INTERNAL == 1 int boards_known_size = 0; int i = 0; const struct board_info *binfo = boards_known; @@ -194,6 +195,9 @@ struct flashrom_board_info *flashrom_supported_boards(void) } return supported_boards; +#else + return NULL; +#endif } /** @@ -202,6 +206,7 @@ struct flashrom_board_info *flashrom_supported_boards(void) */ struct flashrom_chipset_info *flashrom_supported_chipsets(void) { +#if CONFIG_INTERNAL == 1 int chipset_enables_size = 0; int i = 0; const struct penable *chipset = chipset_enables; @@ -228,6 +233,9 @@ struct flashrom_chipset_info *flashrom_supported_chipsets(void) } return supported_chipsets; +#else + return NULL; +#endif } /** |