xref: /spdk/lib/init/subsystem.h (revision 307b8c112ffd90a26d53dd15fad67bd9038ef526)
1 /*   SPDX-License-Identifier: BSD-3-Clause
2  *   Copyright (c) Intel Corporation.  All rights reserved.
3  */
4 
5 #ifndef SPDK_SUBSYSTEM_H
6 #define SPDK_SUBSYSTEM_H
7 
8 struct spdk_subsystem *subsystem_find(const char *name);
9 struct spdk_subsystem *subsystem_get_first(void);
10 struct spdk_subsystem *subsystem_get_next(struct spdk_subsystem *cur_subsystem);
11 
12 struct spdk_subsystem_depend *subsystem_get_first_depend(void);
13 struct spdk_subsystem_depend *subsystem_get_next_depend(struct spdk_subsystem_depend
14 		*cur_depend);
15 
16 /**
17  * Save pointed \c subsystem configuration to the JSON write context \c w. In case of
18  * error \c null is written to the JSON context.
19  *
20  * \param w JSON write context
21  * \param subsystem the subsystem to query
22  */
23 void subsystem_config_json(struct spdk_json_write_ctx *w, struct spdk_subsystem *subsystem);
24 
25 #endif
26