X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fpc80%2Fmc146818rtc.c;h=d9a3d481e9caf1e3e80887a26482e671d939d4c8;hb=cef3b896c1593de5a41b57bff4d4600d0c90e06e;hp=32543f01c2b85380bce22f7274a78f7d94a24392;hpb=244793784ce63957f3ba3a1b9dbf2d2cdf0c506a;p=coreboot.git diff --git a/src/pc80/mc146818rtc.c b/src/pc80/mc146818rtc.c index 32543f01c..d9a3d481e 100644 --- a/src/pc80/mc146818rtc.c +++ b/src/pc80/mc146818rtc.c @@ -228,6 +228,10 @@ int get_option(void *dest, const char *name) /* find the requested entry record */ ct=cbfs_find_file("cmos_layout.bin", CMOS_COMPONENT_CMOS_LAYOUT); + if (!ct) { + printk(BIOS_ERR, "cmos_layout.bin could not be found. Options are disabled\n"); + return(-2); + } ce=(struct cmos_entries*)((unsigned char *)ct + ct->header_length); for(;ce->tag==LB_TAG_OPTION; ce=(struct cmos_entries*)((unsigned char *)ce + ce->size)) {