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

Side by Side Diff: host/arch/x86/lib/crossystem_arch.c

Issue 6813054: Add crossystem arch (reports x86 or arm, depending on platform) (Closed) Base URL: ssh://gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « host/arch/arm/lib/crossystem_arch.c ('k') | utility/crossystem_main.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « host/arch/arm/lib/crossystem_arch.c ('k') | utility/crossystem_main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698