build_opt_tbl: error instead of null pointer access if no checksum is defined.
xe7501devkit: If cmos.layout is used, there must be a checksum. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5327 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
c719f1a506
commit
fd0bef825d
|
@ -52,4 +52,5 @@ enumerations
|
||||||
checksums
|
checksums
|
||||||
|
|
||||||
# Checksum FROM bit-location TO bit-location STORE AT bit-location
|
# Checksum FROM bit-location TO bit-location STORE AT bit-location
|
||||||
#checksum 1024 1047 1048
|
checksum 1024 1047 1048
|
||||||
|
|
||||||
|
|
|
@ -608,9 +608,17 @@ int main(int argc, char **argv)
|
||||||
fprintf(fp, "#define CMOS_VLEN_%s %d\n",
|
fprintf(fp, "#define CMOS_VLEN_%s %d\n",
|
||||||
ce->name, ce->length);
|
ce->name, ce->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cs != NULL) {
|
||||||
fprintf(fp, "\n#define LB_CKS_RANGE_START %d\n", cs->range_start / 8);
|
fprintf(fp, "\n#define LB_CKS_RANGE_START %d\n", cs->range_start / 8);
|
||||||
fprintf(fp, "#define LB_CKS_RANGE_END %d\n", cs->range_end / 8);
|
fprintf(fp, "#define LB_CKS_RANGE_END %d\n", cs->range_end / 8);
|
||||||
fprintf(fp, "#define LB_CKS_LOC %d\n", cs->location / 8);
|
fprintf(fp, "#define LB_CKS_LOC %d\n", cs->location / 8);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Error - No checksums defined.\n");
|
||||||
|
fclose(fp);
|
||||||
|
unlink(tempfilename);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
UNLINK_IF_NECESSARY(header);
|
UNLINK_IF_NECESSARY(header);
|
||||||
|
|
Loading…
Reference in New Issue