Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright (c) 2024 Intel Corporation. All rights reserved. 3 : : */ 4 : : 5 : : #include "spdk/stdinc.h" 6 : : #include "spdk/keyring.h" 7 : : #include "spdk_internal/init.h" 8 : : 9 : : static void 10 : 2114 : keyring_subsystem_init(void) 11 : : { 12 : 2114 : int rc = spdk_keyring_init(); 13 : : 14 : 2114 : spdk_subsystem_init_next(rc); 15 : 2114 : } 16 : : 17 : : static void 18 : 2114 : keyring_subsystem_fini(void) 19 : : { 20 : 2114 : spdk_keyring_cleanup(); 21 : 2114 : spdk_subsystem_fini_next(); 22 : 2114 : } 23 : : 24 : : static void 25 : 119 : keyring_subsystem_write_config_json(struct spdk_json_write_ctx *w) 26 : : { 27 : 119 : spdk_json_write_array_begin(w); 28 : 119 : spdk_keyring_write_config(w); 29 : 119 : spdk_json_write_array_end(w); 30 : 119 : } 31 : : 32 : : static struct spdk_subsystem g_subsystem_keyring = { 33 : : .name = "keyring", 34 : : .init = keyring_subsystem_init, 35 : : .fini = keyring_subsystem_fini, 36 : : .write_config_json = keyring_subsystem_write_config_json, 37 : : }; 38 : : 39 : 2240 : SPDK_SUBSYSTEM_REGISTER(g_subsystem_keyring);