Return more meaningful error codes from vboot entry points

This also fixes one place where TPM error codes were getting lost.

BUG=chromium-os:18132
TEST=make && make runtests

Change-Id: I83c74e1103805f166d1dc7448be7d67bd46d15b3
Reviewed-on: http://gerrit.chromium.org/gerrit/4659
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Randall Spangler
2011-07-25 09:19:58 -07:00
parent 22e7bb2b8e
commit 1cf77cda5e
4 changed files with 114 additions and 52 deletions

View File

@@ -34,7 +34,7 @@ VbError_t VbInit(VbCommonParams* cparams, VbInitParams* iparams) {
/* Initialize shared data structure */
if (0 != VbSharedDataInit(shared, cparams->shared_data_size)) {
VBDEBUG(("Shared data init error\n"));
return 1;
return VBERROR_INIT_SHARED_DATA;
}
shared->timer_vb_init_enter = VbExGetTimer();
@@ -115,7 +115,7 @@ VbError_t VbInit(VbCommonParams* cparams, VbInitParams* iparams) {
/* If we can't resume, just do a full reboot. No need to go to recovery
* mode here, since if the TPM is really broken we'll catch it on the
* next boot. */
retval = 1;
retval = VBERROR_TPM_S3_RESUME;
}
}