LCOV - code coverage report
Current view: top level - spdk/module/event/subsystems/keyring - keyring.c (source / functions) Hit Total Coverage
Test: Combined Lines: 14 14 100.0 %
Date: 2024-07-15 15:46:34 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           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                 :       1905 : keyring_subsystem_init(void)
      11                 :            : {
      12                 :       1905 :         int rc = spdk_keyring_init();
      13                 :            : 
      14                 :       1905 :         spdk_subsystem_init_next(rc);
      15                 :       1905 : }
      16                 :            : 
      17                 :            : static void
      18                 :       1905 : keyring_subsystem_fini(void)
      19                 :            : {
      20                 :       1905 :         spdk_keyring_cleanup();
      21                 :       1905 :         spdk_subsystem_fini_next();
      22                 :       1905 : }
      23                 :            : 
      24                 :            : static void
      25                 :        107 : keyring_subsystem_write_config_json(struct spdk_json_write_ctx *w)
      26                 :            : {
      27                 :        107 :         spdk_json_write_array_begin(w);
      28                 :        107 :         spdk_keyring_write_config(w);
      29                 :        107 :         spdk_json_write_array_end(w);
      30                 :        107 : }
      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                 :       2021 : SPDK_SUBSYSTEM_REGISTER(g_subsystem_keyring);

Generated by: LCOV version 1.14