aboutsummaryrefslogtreecommitdiff
path: root/components/service/secure_storage/backend/null_store/null_store.h
blob: 9da983b0b4de7b87f0ece4cda4b0245761325f2d (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
/*
 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef NULL_STORE_H
#define NULL_STORE_H

#include <service/secure_storage/backend/storage_backend.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * The null_store is intended to be used when an error makes
 * it impossible to initialise a real storage backend.  The
 * null_store provides handlers for the storage_backend
 * interface but returns an error if any are called.  Example
 * error conditions where the null_store cab used are:
 *  - configuration error leading to a partition discovery failure
 *  - a hardware fault
 */
struct null_store
{
    struct storage_backend backend;
};

struct storage_backend *null_store_init(struct null_store *context);
void null_store_deinit(struct null_store *context);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* NULL_STORE_H */