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 : 229 : nvmf_tgt_started(void *arg1) 24 : : { 25 [ - + - + ]: 229 : if (getenv("MEMZONE_DUMP") != NULL) { 26 : 0 : spdk_memzone_dump(stdout); 27 : 0 : fflush(stdout); 28 : : } 29 : 229 : } 30 : : 31 : : int 32 : 229 : main(int argc, char **argv) 33 : : { 34 : : int rc; 35 : 229 : struct spdk_app_opts opts = {}; 36 : : 37 : : /* default value in opts */ 38 : 229 : spdk_app_opts_init(&opts, sizeof(opts)); 39 : 229 : opts.name = "nvmf"; 40 [ - + ]: 229 : 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 : 229 : rc = spdk_app_start(&opts, nvmf_tgt_started, NULL); 48 : 229 : spdk_app_fini(); 49 : 229 : return rc; 50 : : }