summaryrefslogtreecommitdiff
path: root/src/pc80
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-01-18 14:28:45 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2011-01-18 14:28:45 +0000
commitcef3b896c1593de5a41b57bff4d4600d0c90e06e (patch)
tree4fccdf55b3aa2adc0427472ee496f48a839807f0 /src/pc80
parent244793784ce63957f3ba3a1b9dbf2d2cdf0c506a (diff)
Report if cmos_layout.bin can't be found when it should.
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Patrick Georgi <patrick.georgi@secunet.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6269 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/pc80')
-rw-r--r--src/pc80/mc146818rtc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pc80/mc146818rtc.c b/src/pc80/mc146818rtc.c
index 32543f01c2..d9a3d481e9 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)) {