mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Remove unused test fields from VbNvStorage
Confirmed via codesearch that these fields are not used outside of vboot_reference itself, and the only use inside vboot_reference is one test which checked that the test error generation itself worked. BUG=chromium-os:31668 TEST=make && make runtests Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: Ic393e126ca2853f7aaff19ffd6fcdbdb1c47689f Reviewed-on: https://gerrit.chromium.org/gerrit/24895 Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*
|
||||
@@ -139,7 +139,6 @@ VbError_t LoadKernel(LoadKernelParams* params) {
|
||||
uint32_t lowest_version = LOWEST_TPM_VERSION;
|
||||
int rec_switch, dev_switch;
|
||||
BootMode boot_mode;
|
||||
uint32_t test_err = 0;
|
||||
uint32_t require_official_os = 0;
|
||||
|
||||
VbError_t retval = VBERROR_UNKNOWN;
|
||||
@@ -184,23 +183,6 @@ VbError_t LoadKernel(LoadKernelParams* params) {
|
||||
shcall->sector_count = params->ending_lba + 1;
|
||||
shared->lk_call_count++;
|
||||
|
||||
/* Handle test errors */
|
||||
VbNvGet(vnc, VBNV_TEST_ERROR_FUNC, &test_err);
|
||||
if (VBNV_TEST_ERROR_LOAD_KERNEL == test_err) {
|
||||
/* Get error code */
|
||||
VbNvGet(vnc, VBNV_TEST_ERROR_NUM, &test_err);
|
||||
shcall->test_error_num = (uint8_t)test_err;
|
||||
/* Clear test params so we don't repeat the error */
|
||||
VbNvSet(vnc, VBNV_TEST_ERROR_FUNC, 0);
|
||||
VbNvSet(vnc, VBNV_TEST_ERROR_NUM, 0);
|
||||
/* All error codes currently map to simulated error */
|
||||
if (test_err) {
|
||||
recovery = VBNV_RECOVERY_RW_TEST_LK;
|
||||
retval = VBERROR_SIMULATED;
|
||||
goto LoadKernelExit;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
blba = params->bytes_per_lba;
|
||||
kbuf_sectors = KBUF_SIZE / blba;
|
||||
|
||||
Reference in New Issue
Block a user