1 /*
2  * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef NULL_STORE_H
8 #define NULL_STORE_H
9 
10 #include <service/secure_storage/backend/storage_backend.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /**
17  * The null_store is intended to be used when an error makes
18  * it impossible to initialise a real storage backend.  The
19  * null_store provides handlers for the storage_backend
20  * interface but returns an error if any are called.  Example
21  * error conditions where the null_store cab used are:
22  *  - configuration error leading to a partition discovery failure
23  *  - a hardware fault
24  */
25 struct null_store
26 {
27     struct storage_backend backend;
28 };
29 
30 struct storage_backend *null_store_init(struct null_store *context);
31 void null_store_deinit(struct null_store *context);
32 
33 #ifdef __cplusplus
34 } /* extern "C" */
35 #endif
36 
37 #endif /* NULL_STORE_H */
38