blob: 41a16467dc6bbe90b0a6295c2b71f4285823e068 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* Copyright (c) 2013 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 firmware-provided API functions.
*/
#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))
void *VbExMalloc(size_t size)
{
void *p = malloc(size);
if (!p) {
/* Fatal Error. We must abort. */
abort();
}
return p;
}
void VbExFree(void *ptr)
{
free(ptr);
}
VbError_t VbExHashFirmwareBody(VbCommonParams *cparams,
uint32_t firmware_index)
{
return VBERROR_SUCCESS;
}
|