iscsi_top: Convert to C99

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

Change-Id: I5e7a7b0dfcbbe6402a1774fc2fcf53778355d3a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4345
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Ben Walker 2020-09-22 14:27:53 -07:00 committed by Tomasz Zawadzki
parent 1477d36597
commit ed1b78529d
2 changed files with 5 additions and 10 deletions

View File

@ -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

View File

@ -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;