132a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
232a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler * Use of this source code is governed by a BSD-style license that can be
332a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler * found in the LICENSE file.
432a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler *
532a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler * Stub implementations of disk APIs.
632a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler */
732a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
80c3ba249abb1dc60f5ebabccf84ff13206440b83Bill Richardson#include <stdint.h>
90c3ba249abb1dc60f5ebabccf84ff13206440b83Bill Richardson
1032a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#define _STUB_IMPLEMENTATION_
1132a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
1232a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#include <stdarg.h>
1332a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#include <stdio.h>
1432a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#include <stdlib.h>
1532a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#include <string.h>
1632a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#include <sys/time.h>
1732a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
1832a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler#include "vboot_api.h"
1932a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
2032a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
2132a6526d25d4bf9a1c137fc3d275d1c68935d184Randall SpanglerVbError_t VbExDiskGetInfo(VbDiskInfo** infos_ptr, uint32_t* count,
2232a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler                          uint32_t disk_flags) {
2332a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler  *infos_ptr = NULL;
2432a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler  *count = 0;
2532a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler  return VBERROR_SUCCESS;
2632a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler}
2732a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
2832a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
2932a6526d25d4bf9a1c137fc3d275d1c68935d184Randall SpanglerVbError_t VbExDiskFreeInfo(VbDiskInfo* infos_ptr,
3032a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler                           VbExDiskHandle_t preserve_handle) {
3132a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler  return VBERROR_SUCCESS;
3232a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler}
3332a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
3432a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
3532a6526d25d4bf9a1c137fc3d275d1c68935d184Randall SpanglerVbError_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start,
3632a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler                       uint64_t lba_count, void* buffer) {
3732a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler  return VBERROR_SUCCESS;
3832a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler}
3932a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
4032a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler
4132a6526d25d4bf9a1c137fc3d275d1c68935d184Randall SpanglerVbError_t VbExDiskWrite(VbExDiskHandle_t handle, uint64_t lba_start,
4232a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler                        uint64_t lba_count, const void* buffer) {
4332a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler  return VBERROR_SUCCESS;
4432a6526d25d4bf9a1c137fc3d275d1c68935d184Randall Spangler}
45