From d7134e06b1b1ac21108b23438604b7385e4a43fa Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Sat, 23 Nov 2013 18:54:44 -0600 Subject: pc80/mc146818rtc: Return an error code rather than an integer Do not return hardcoded numerical values to communicate succes/failure, but instead use an enumeration. Change-Id: I742b08796adf136dce5984b702533f91640846dd Signed-off-by: Alexandru Gagniuc Reviewed-on: http://review.coreboot.org/4265 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/include/types.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/types.h') diff --git a/src/include/types.h b/src/include/types.h index 180fa3a68a..d1f991eb5d 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -34,6 +34,13 @@ enum cb_err { CB_SUCCESS = 0, /**< Call completed succesfully */ CB_ERR = -1, /**< Generic error code */ CB_ERR_ARG = -2, /**< Invalid argument */ + + /* NVRAM/CMOS errors */ + CB_CMOS_OTABLE_DISABLED = -100, /**< Option table disabled */ + CB_CMOS_LAYOUT_NOT_FOUND = -101, /**< Layout file not found */ + CB_CMOS_OPTION_NOT_FOUND = -102, /**< Option string not found */ + CB_CMOS_ACCESS_ERROR = -103, /**< CMOS access error */ + CB_CMOS_CHECKSUM_INVALID = -104, /**< CMOS checksum is invalid */ }; #endif /* __TYPES_H */ -- cgit v1.2.3