Changeset 1021 for trunk/layout.c
- Timestamp:
- 05/31/10 00:24:40 (2 years ago)
- File:
-
- 1 edited
-
trunk/layout.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/layout.c
r996 r1021 19 19 */ 20 20 21 #include <stdio.h> 21 22 #include <stdlib.h> 22 23 #include <string.h> … … 74 75 if ((*walk) == 0 || ((*walk) & 0x3ff) != 0 || (*walk) > size || 75 76 mb_part_offset > size || mb_vendor_offset > size) { 76 printf("Flash image seems to be a legacy BIOS. Disabling checks.\n");77 msg_pinfo("Flash image seems to be a legacy BIOS. Disabling checks.\n"); 77 78 return 0; 78 79 } … … 82 83 if (!isprint((unsigned char)*mb_part) || 83 84 !isprint((unsigned char)*mb_vendor)) { 84 printf("Flash image seems to have garbage in the ID location."85 msg_pinfo("Flash image seems to have garbage in the ID location." 85 86 " Disabling checks.\n"); 86 87 return 0; 87 88 } 88 89 89 printf_debug("coreboot last image size "90 msg_pdbg("coreboot last image size " 90 91 "(not ROM size) is %d bytes.\n", *walk); 91 92 92 93 mainboard_part = strdup(mb_part); 93 94 mainboard_vendor = strdup(mb_vendor); 94 printf_debug("Manufacturer: %s\n", mainboard_vendor);95 printf_debug("Mainboard ID: %s\n", mainboard_part);95 msg_pdbg("Manufacturer: %s\n", mainboard_vendor); 96 msg_pdbg("Mainboard ID: %s\n", mainboard_part); 96 97 97 98 /* … … 100 101 */ 101 102 if (!lb_vendor || !lb_part) { 102 printf("Note: If the following flash access fails, "103 msg_pinfo("Note: If the following flash access fails, " 103 104 "try -m <vendor>:<mainboard>.\n"); 104 105 return 0; … … 110 111 if (!strcasecmp(mainboard_vendor, lb_vendor) && 111 112 !strcasecmp(mainboard_part, lb_part)) { 112 printf_debug("This firmware image matches this mainboard.\n");113 msg_pdbg("This firmware image matches this mainboard.\n"); 113 114 } else { 114 115 if (force_boardmismatch) { 115 printf("WARNING: This firmware image does not "116 msg_pinfo("WARNING: This firmware image does not " 116 117 "seem to fit to this machine - forcing it.\n"); 117 118 } else { 118 printf("ERROR: Your firmware image (%s:%s) does not "119 msg_pinfo("ERROR: Your firmware image (%s:%s) does not " 119 120 "appear to\n be correct for the detected " 120 121 "mainboard (%s:%s)\n\nOverride with -p internal:" … … 142 143 143 144 if (!romlayout) { 144 fprintf(stderr,"ERROR: Could not open ROM layout (%s).\n",145 msg_gerr("ERROR: Could not open ROM layout (%s).\n", 145 146 name); 146 147 return -1; … … 160 161 tstr2 = strtok(NULL, ":"); 161 162 if (!tstr1 || !tstr2) { 162 fprintf(stderr,"Error parsing layout file.\n");163 msg_gerr("Error parsing layout file.\n"); 163 164 fclose(romlayout); 164 165 return 1; … … 171 172 172 173 for (i = 0; i < romimages; i++) { 173 printf_debug("romlayout %08x - %08x named %s\n",174 msg_gdbg("romlayout %08x - %08x named %s\n", 174 175 rom_entries[i].start, 175 176 rom_entries[i].end, rom_entries[i].name); … … 188 189 return -1; 189 190 190 printf("Looking for \"%s\"... ", name);191 msg_ginfo("Looking for \"%s\"... ", name); 191 192 192 193 for (i = 0; i < romimages; i++) { 193 194 if (!strcmp(rom_entries[i].name, name)) { 194 195 rom_entries[i].included = 1; 195 printf("found.\n");196 msg_ginfo("found.\n"); 196 197 return i; 197 198 } 198 199 } 199 printf("not found.\n"); // Not found. Error.200 msg_ginfo("not found.\n"); // Not found. Error. 200 201 201 202 return -1;
Note: See TracChangeset
for help on using the changeset viewer.
