blob: c266177db5c5e2f94c00bcf20d44302c3286b0f4 (
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
|
/* Copyright (c) 2014 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.
*
* Workaround for TODO(crbug.com/437107). Remove this file when it's fixed.
*/
#define _STUB_IMPLEMENTATION_
#include <stdio.h>
#include <stdlib.h>
#include "vboot_api.h"
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);
}
/*
* This file should be used only when building the static version of futility,
* so let's intentionally break any tests that link with it by accident.
*/
int vboot_api_stub_check_memory(void)
{
return -1;
}
|