#include "spdk/stdinc.h"
#include "spdk/event.h"
+#include "spdk/string.h"
#include "spdk/thread.h"
static int g_time_in_sec;
}
static void
-test_start(void *arg1, void *arg2)
+test_start(void *arg1)
{
printf("test_start\n");
spdk_app_opts_init(&opts);
opts.name = "reactor";
- opts.max_delay_us = 1000;
g_time_in_sec = 0;
while ((op = getopt(argc, argv, "t:")) != -1) {
switch (op) {
case 't':
- g_time_in_sec = atoi(optarg);
+ g_time_in_sec = spdk_strtol(optarg, 10);
break;
default:
usage(argv[0]);
}
}
- if (!g_time_in_sec) {
+ if (g_time_in_sec <= 0) {
usage(argv[0]);
exit(1);
}
- rc = spdk_app_start(&opts, test_start, NULL, NULL);
+ rc = spdk_app_start(&opts, test_start, NULL);
spdk_app_fini();