• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3  * found in the LICENSE file.
4  *
5  * Stub implementations of disk APIs.
6  */
7 
8 #include <stdint.h>
9 
10 #define _STUB_IMPLEMENTATION_
11 
12 #include <stdarg.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
16 #include <sys/time.h>
17 
18 #include "vboot_api.h"
19 
20 
VbExDiskGetInfo(VbDiskInfo ** infos_ptr,uint32_t * count,uint32_t disk_flags)21 VbError_t VbExDiskGetInfo(VbDiskInfo** infos_ptr, uint32_t* count,
22                           uint32_t disk_flags) {
23   *infos_ptr = NULL;
24   *count = 0;
25   return VBERROR_SUCCESS;
26 }
27 
28 
VbExDiskFreeInfo(VbDiskInfo * infos_ptr,VbExDiskHandle_t preserve_handle)29 VbError_t VbExDiskFreeInfo(VbDiskInfo* infos_ptr,
30                            VbExDiskHandle_t preserve_handle) {
31   return VBERROR_SUCCESS;
32 }
33 
34 
VbExDiskRead(VbExDiskHandle_t handle,uint64_t lba_start,uint64_t lba_count,void * buffer)35 VbError_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start,
36                        uint64_t lba_count, void* buffer) {
37   return VBERROR_SUCCESS;
38 }
39 
40 
VbExDiskWrite(VbExDiskHandle_t handle,uint64_t lba_start,uint64_t lba_count,const void * buffer)41 VbError_t VbExDiskWrite(VbExDiskHandle_t handle, uint64_t lba_start,
42                         uint64_t lba_count, const void* buffer) {
43   return VBERROR_SUCCESS;
44 }
45