summaryrefslogtreecommitdiff
path: root/firmware/stub/vboot_api_stub_disk.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 /firmware/stub/vboot_api_stub_disk.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 'firmware/stub/vboot_api_stub_disk.c')
-rw-r--r--firmware/stub/vboot_api_stub_disk.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/firmware/stub/vboot_api_stub_disk.c b/firmware/stub/vboot_api_stub_disk.c
new file mode 100644
index 00000000..463b2f98
--- /dev/null
+++ b/firmware/stub/vboot_api_stub_disk.c
@@ -0,0 +1,45 @@
+/* Copyright (c) 2011 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.
+ *
+ * Stub implementations of disk APIs.
+ */
+
+#define _STUB_IMPLEMENTATION_
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+
+#include "vboot_api.h"
+
+/* disable MSVC warnings on unused arguments */
+__pragma(warning (disable: 4100))
+
+
+VbError_t VbExDiskGetInfo(VbDiskInfo** infos_ptr, uint32_t* count,
+ uint32_t disk_flags) {
+ *infos_ptr = NULL;
+ *count = 0;
+ return VBERROR_SUCCESS;
+}
+
+
+VbError_t VbExDiskFreeInfo(VbDiskInfo* infos_ptr,
+ VbExDiskHandle_t preserve_handle) {
+ return VBERROR_SUCCESS;
+}
+
+
+VbError_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start,
+ uint64_t lba_count, void* buffer) {
+ return VBERROR_SUCCESS;
+}
+
+
+VbError_t VbExDiskWrite(VbExDiskHandle_t handle, uint64_t lba_start,
+ uint64_t lba_count, const void* buffer) {
+ return VBERROR_SUCCESS;
+}