Commit ed1b7852 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

iscsi_top: Convert to C99



This is already valid C, so compile it using the C compiler.

Change-Id: I5e7a7b0dfcbbe6402a1774fc2fcf53778355d3a4
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4345


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 1477d365
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@ APP = iscsi_top

SPDK_LIB_LIST = jsonrpc json rpc log util

CXXFLAGS += -I$(SPDK_ROOT_DIR)/lib
CFLAGS += -I$(SPDK_ROOT_DIR)/lib

CXX_SRCS := iscsi_top.cpp
C_SRCS := iscsi_top.c

include $(SPDK_ROOT_DIR)/mk/spdk.app_cxx.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
+2 −7
Original line number Diff line number Diff line
@@ -33,19 +33,14 @@

#include "spdk/stdinc.h"

#include <algorithm>
#include <map>
#include <vector>

extern "C" {
#include "spdk/event.h"
#include "spdk/jsonrpc.h"
#include "spdk/rpc.h"
#include "spdk/string.h"
#include "spdk/trace.h"
#include "spdk/util.h"

#include "iscsi/conn.h"
}

static char *exe_name;
static int g_shm_id = 0;
@@ -162,7 +157,7 @@ int main(int argc, char **argv)
	while ((op = getopt(argc, argv, "i:r:")) != -1) {
		switch (op) {
		case 'i':
			g_shm_id = atoi(optarg);
			g_shm_id = spdk_strtol(optarg, 10);
			break;
		case 'r':
			rpc_socket_path = optarg;