LCOV - code coverage report
Current view: top level - spdk/app/nvmf_tgt - nvmf_main.c (source / functions) Hit Total Coverage
Test: Combined Lines: 11 18 61.1 %
Date: 2024-07-14 11:50:42 Functions: 2 4 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 6 50.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 "spdk/env.h"
       9                 :            : #include "spdk/event.h"
      10                 :            : 
      11                 :            : static void
      12                 :          0 : nvmf_usage(void)
      13                 :            : {
      14                 :          0 : }
      15                 :            : 
      16                 :            : static int
      17                 :          0 : nvmf_parse_arg(int ch, char *arg)
      18                 :            : {
      19                 :          0 :         return 0;
      20                 :            : }
      21                 :            : 
      22                 :            : static void
      23                 :        196 : nvmf_tgt_started(void *arg1)
      24                 :            : {
      25   [ -  +  -  + ]:        196 :         if (getenv("MEMZONE_DUMP") != NULL) {
      26                 :          0 :                 spdk_memzone_dump(stdout);
      27                 :          0 :                 fflush(stdout);
      28                 :            :         }
      29                 :        196 : }
      30                 :            : 
      31                 :            : int
      32                 :        196 : main(int argc, char **argv)
      33                 :            : {
      34                 :            :         int rc;
      35                 :        196 :         struct spdk_app_opts opts = {};
      36                 :            : 
      37                 :            :         /* default value in opts */
      38                 :        196 :         spdk_app_opts_init(&opts, sizeof(opts));
      39                 :        196 :         opts.name = "nvmf";
      40         [ -  + ]:        196 :         if ((rc = spdk_app_parse_args(argc, argv, &opts, "", NULL,
      41                 :            :                                       nvmf_parse_arg, nvmf_usage)) !=
      42                 :            :             SPDK_APP_PARSE_ARGS_SUCCESS) {
      43                 :          0 :                 exit(rc);
      44                 :            :         }
      45                 :            : 
      46                 :            :         /* Blocks until the application is exiting */
      47                 :        196 :         rc = spdk_app_start(&opts, nvmf_tgt_started, NULL);
      48                 :        196 :         spdk_app_fini();
      49                 :        196 :         return rc;
      50                 :            : }

Generated by: LCOV version 1.14