summaryrefslogtreecommitdiff
path: root/host/arch/x86/lib/crossystem_arch.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-06-27 10:49:11 -0700
committerRandall Spangler <rspangler@chromium.org>2011-06-27 13:30:41 -0700
commit32a6526d25d4bf9a1c137fc3d275d1c68935d184 (patch)
tree8659c56a4129ff40f631670b7fd3b94bda73fe20 /host/arch/x86/lib/crossystem_arch.c
parent7adcc60e6f5f6db081b9ad6e02288335502a0d77 (diff)
downloadvboot-32a6526d25d4bf9a1c137fc3d275d1c68935d184.tar.gz
Verified boot wrapper - add stub implementations for host
This is part 2 of the wrapper API refactor. It adds stub implementations for the host, and changes the host-side utilities to use them. Firmware implementation is unchanged in this CL (other than a few updates to macros). BUG=chromium_os:16997 TEST=make && make runtests Change-Id: I63989bd11de1f2239ddae256beaccd31bfb5acef Reviewed-on: http://gerrit.chromium.org/gerrit/3256 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'host/arch/x86/lib/crossystem_arch.c')
-rw-r--r--host/arch/x86/lib/crossystem_arch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 25867e12..670ce364 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -180,7 +180,7 @@ static uint8_t* VbGetBuffer(const char* filename, int* buffer_size) {
if (!f)
break;
- file_buffer = Malloc(fs.st_size + 1);
+ file_buffer = malloc(fs.st_size + 1);
if (!file_buffer)
break;
@@ -192,7 +192,7 @@ static uint8_t* VbGetBuffer(const char* filename, int* buffer_size) {
/* Each byte in the output will replace two characters and a space
* in the input, so the output size does not exceed input side/3
* (a little less if account for newline characters). */
- output_buffer = Malloc(real_size/3);
+ output_buffer = malloc(real_size/3);
if (!output_buffer)
break;
output_ptr = output_buffer;
@@ -229,10 +229,10 @@ static uint8_t* VbGetBuffer(const char* filename, int* buffer_size) {
fclose(f);
if (file_buffer)
- Free(file_buffer);
+ free(file_buffer);
if (output_buffer)
- Free(output_buffer);
+ free(output_buffer);
return return_value;
}
@@ -257,7 +257,7 @@ VbSharedDataHeader* VbSharedDataRead(void) {
}
if (got_size < expect_size) {
- Free(sh);
+ free(sh);
return NULL;
}
if (sh->data_size > got_size)
@@ -388,7 +388,7 @@ static int VbGetRecoveryReason(void) {
if (sh) {
if (sh->struct_version >= 2)
value = sh->recovery_reason;
- Free(sh);
+ free(sh);
if (-1 != value)
return value;
}