| OLD | NEW | 
|---|
| 1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 
| 2  * Use of this source code is governed by a BSD-style license that can be | 2  * Use of this source code is governed by a BSD-style license that can be | 
| 3  * found in the LICENSE file. | 3  * found in the LICENSE file. | 
| 4  */ | 4  */ | 
| 5 | 5 | 
| 6 #include <stdio.h> | 6 #include <stdio.h> | 
| 7 #include <string.h> | 7 #include <string.h> | 
| 8 #include <sys/types.h> | 8 #include <sys/types.h> | 
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> | 
| 10 #include <unistd.h> | 10 #include <unistd.h> | 
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 522     if (-1 == value) | 522     if (-1 == value) | 
| 523       value = VbGetCmosRebootField(CMOSRF_TRY_B); | 523       value = VbGetCmosRebootField(CMOSRF_TRY_B); | 
| 524   } | 524   } | 
| 525 | 525 | 
| 526   return value; | 526   return value; | 
| 527 } | 527 } | 
| 528 | 528 | 
| 529 | 529 | 
| 530 const char* VbGetArchPropertyString(const char* name, char* dest, int size) { | 530 const char* VbGetArchPropertyString(const char* name, char* dest, int size) { | 
| 531 | 531 | 
| 532   if (!strcasecmp(name,"hwid")) { | 532   if (!strcasecmp(name,"arch")) { | 
|  | 533     return StrCopy(dest, "x86", size); | 
|  | 534   } else if (!strcasecmp(name,"hwid")) { | 
| 533     return ReadFileString(dest, size, ACPI_BASE_PATH "/HWID"); | 535     return ReadFileString(dest, size, ACPI_BASE_PATH "/HWID"); | 
| 534   } else if (!strcasecmp(name,"fwid")) { | 536   } else if (!strcasecmp(name,"fwid")) { | 
| 535     return ReadFileString(dest, size, ACPI_BASE_PATH "/FWID"); | 537     return ReadFileString(dest, size, ACPI_BASE_PATH "/FWID"); | 
| 536   } else if (!strcasecmp(name,"ro_fwid")) { | 538   } else if (!strcasecmp(name,"ro_fwid")) { | 
| 537     return ReadFileString(dest, size, ACPI_BASE_PATH "/FRID"); | 539     return ReadFileString(dest, size, ACPI_BASE_PATH "/FRID"); | 
| 538   } else if (!strcasecmp(name,"mainfw_act")) { | 540   } else if (!strcasecmp(name,"mainfw_act")) { | 
| 539     switch(ReadFileInt(ACPI_BINF_PATH ".1")) { | 541     switch(ReadFileInt(ACPI_BINF_PATH ".1")) { | 
| 540       case 0: | 542       case 0: | 
| 541         return StrCopy(dest, "recovery", size); | 543         return StrCopy(dest, "recovery", size); | 
| 542       case 1: | 544       case 1: | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 582 | 584 | 
| 583   return -1; | 585   return -1; | 
| 584 } | 586 } | 
| 585 | 587 | 
| 586 | 588 | 
| 587 int VbSetArchPropertyString(const char* name, const char* value) { | 589 int VbSetArchPropertyString(const char* name, const char* value) { | 
| 588   /* If there were settable architecture-dependent string properties, | 590   /* If there were settable architecture-dependent string properties, | 
| 589    * they'd be here. */ | 591    * they'd be here. */ | 
| 590   return -1; | 592   return -1; | 
| 591 } | 593 } | 
| OLD | NEW | 
|---|