Patch attached. Is strcasecmp() not kosher enough?

//Peter
flashrom: Case insensitive matching of vendor:board strings in coreboot table

Needed at least for GIGABYTE:m57sli in coreboot to match gigabyte:m57sli in
flashrom.

Signed-off-by: Peter Stuge <[EMAIL PROTECTED]>

Index: board_enable.c
===================================================================
--- board_enable.c	(revision 3385)
+++ board_enable.c	(working copy)
@@ -648,10 +648,10 @@
 	struct board_pciid_enable *partmatch = NULL;
 
 	for (; board->name; board++) {
-		if (vendor && (!board->lb_vendor || strcmp(board->lb_vendor, vendor)))
+		if (vendor && (!board->lb_vendor || strcasecmp(board->lb_vendor, vendor)))
 			continue;
 
-		if (!board->lb_part || strcmp(board->lb_part, part))
+		if (!board->lb_part || strcasecmp(board->lb_part, part))
 			continue;
 
 		if (!pci_dev_find(board->first_vendor, board->first_device))
@@ -678,8 +678,7 @@
 	if (partmatch)
 		return partmatch;
 
-	printf("NOT FOUND %s:%s\n", vendor, part);
-
+	printf("\nUnknown vendor:board in coreboot table: %s:%s\n\n", vendor, part);
 	return NULL;
 }
 
-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to