LCOV - code coverage report
Current view: top level - spdk/module/event/subsystems/iscsi - iscsi.c (source / functions) Hit Total Coverage
Test: Combined Lines: 18 18 100.0 %
Date: 2024-07-12 23:02:27 Functions: 8 8 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) 2017 Intel Corporation.
       3                 :            :  *   All rights reserved.
       4                 :            :  */
       5                 :            : 
       6                 :            : #include "spdk/stdinc.h"
       7                 :            : 
       8                 :            : #include "iscsi/iscsi.h"
       9                 :            : 
      10                 :            : #include "spdk_internal/init.h"
      11                 :            : 
      12                 :            : static void
      13                 :        627 : iscsi_subsystem_init_complete(void *cb_arg, int rc)
      14                 :            : {
      15                 :        627 :         spdk_subsystem_init_next(rc);
      16                 :        627 : }
      17                 :            : 
      18                 :            : static void
      19                 :        627 : iscsi_subsystem_init(void)
      20                 :            : {
      21                 :        627 :         spdk_iscsi_init(iscsi_subsystem_init_complete, NULL);
      22                 :        627 : }
      23                 :            : 
      24                 :            : static void
      25                 :        627 : iscsi_subsystem_fini_done(void *arg)
      26                 :            : {
      27                 :        627 :         spdk_subsystem_fini_next();
      28                 :        627 : }
      29                 :            : 
      30                 :            : static void
      31                 :        627 : iscsi_subsystem_fini(void)
      32                 :            : {
      33                 :        627 :         spdk_iscsi_fini(iscsi_subsystem_fini_done, NULL);
      34                 :        627 : }
      35                 :            : 
      36                 :            : static void
      37                 :        105 : iscsi_subsystem_config_json(struct spdk_json_write_ctx *w)
      38                 :            : {
      39                 :        105 :         spdk_iscsi_config_json(w);
      40                 :        105 : }
      41                 :            : 
      42                 :            : static struct spdk_subsystem g_spdk_subsystem_iscsi = {
      43                 :            :         .name = "iscsi",
      44                 :            :         .init = iscsi_subsystem_init,
      45                 :            :         .fini = iscsi_subsystem_fini,
      46                 :            :         .write_config_json = iscsi_subsystem_config_json,
      47                 :            : };
      48                 :            : 
      49                 :        705 : SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_iscsi);
      50                 :        705 : SPDK_SUBSYSTEM_DEPEND(iscsi, scsi)
      51                 :        705 : SPDK_SUBSYSTEM_DEPEND(iscsi, sock)

Generated by: LCOV version 1.14