Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: host/lib/crossystem.c

Issue 6602040: Add kern_nv field to crossystem (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utility/crossystem_main.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/lib/crossystem.c
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 9fe1febbc97caa10d535619318f5aadcd16768ae..8e482d360d8bcadfd64c314bb4c1b0b7469d76c2 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -487,6 +487,8 @@ int VbGetSystemPropertyInt(const char* name) {
/* NV storage values with no defaults for older BIOS. */
else if (!strcasecmp(name,"tried_fwb")) {
value = VbGetNvStorage(VBNV_TRIED_FIRMWARE_B);
+ } else if (!strcasecmp(name,"kern_nv")) {
+ value = VbGetNvStorage(VBNV_KERNEL_FIELD);
}
/* NV storage values. If unable to get from NV storage, fall back to the
* CMOS reboot field used by older BIOS. */
@@ -571,9 +573,13 @@ const char* VbGetSystemPropertyString(const char* name, char* dest, int size) {
* Returns 0 if success, -1 if error. */
int VbSetSystemPropertyInt(const char* name, int value) {
+ /* NV storage values with no defaults for older BIOS. */
+ if (!strcasecmp(name,"kern_nv")) {
+ return VbSetNvStorage(VBNV_KERNEL_FIELD, value);
+ }
/* NV storage values. If unable to get from NV storage, fall back to the
* CMOS reboot field used by older BIOS. */
- if (!strcasecmp(name,"recovery_request")) {
+ else if (!strcasecmp(name,"recovery_request")) {
if (0 == VbSetNvStorage(VBNV_RECOVERY_REQUEST, value))
return 0;
return VbSetCmosRebootField(CMOSRF_RECOVERY, value);
« no previous file with comments | « no previous file | utility/crossystem_main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698