Fix wiki board enable parameter printing. The logic was incorrect in one place which had && instead of ||. Move the board info #define B to the file where it is used.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-print_wiki_boardenable_param_fix/flash.h =================================================================== --- flashrom-print_wiki_boardenable_param_fix/flash.h (revision 1033) +++ flashrom-print_wiki_boardenable_param_fix/flash.h (working copy) @@ -309,12 +309,6 @@ #endif };
-#ifdef CONFIG_PRINT_WIKI -#define B(vendor, name, status, url, note) { vendor, name, status, url, note } -#else -#define B(vendor, name, status, url, note) { vendor, name, status } -#endif - extern const struct board_info boards_known[]; extern const struct board_info laptops_known[];
Index: flashrom-print_wiki_boardenable_param_fix/print_wiki.c =================================================================== --- flashrom-print_wiki_boardenable_param_fix/print_wiki.c (revision 1033) +++ flashrom-print_wiki_boardenable_param_fix/print_wiki.c (working copy) @@ -145,9 +145,9 @@ color = !color;
k = 0; - while ((b[k].vendor_name != NULL) - && strcmp(b[k].vendor_name, boards[i].vendor) - && strcmp(b[k].board_name, boards[i].name)) { + while ((b[k].vendor_name != NULL) && + (strcmp(b[k].vendor_name, boards[i].vendor) || + strcmp(b[k].board_name, boards[i].name))) { k++; }
Index: flashrom-print_wiki_boardenable_param_fix/print.c =================================================================== --- flashrom-print_wiki_boardenable_param_fix/print.c (revision 1033) +++ flashrom-print_wiki_boardenable_param_fix/print.c (working copy) @@ -245,6 +245,13 @@ }
#if CONFIG_INTERNAL == 1 + +#ifdef CONFIG_PRINT_WIKI +#define B(vendor, name, status, url, note) { vendor, name, status, url, note } +#else +#define B(vendor, name, status, url, note) { vendor, name, status } +#endif + /* Please keep this list alphabetically ordered by vendor/board. */ const struct board_info boards_known[] = { #if defined(__i386__) || defined(__x86_64__)
On Mon, Jun 07, 2010 at 01:15:52AM +0200, Carl-Daniel Hailfinger wrote:
Fix wiki board enable parameter printing. The logic was incorrect in one place which had && instead of ||. Move the board info #define B to the file where it is used.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Oops, my bad.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Uwe.
On 07.06.2010 12:40, Uwe Hermann wrote:
On Mon, Jun 07, 2010 at 01:15:52AM +0200, Carl-Daniel Hailfinger wrote:
Fix wiki board enable parameter printing. The logic was incorrect in one place which had && instead of ||. Move the board info #define B to the file where it is used.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Oops, my bad.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Thanks, committed in r1035.
Regards, Carl-Daniel