util: Remove usage of abort from library code
Change-Id: Ie03b29907f152dc2d0072b84b32a1f5d58818c74 Signed-off-by: Ed rodriguez <edwinr@netapp.com> Signed-off-by: John Meneghini <johnm@netapp.com> Reviewed-on: https://review.gerrithub.io/419285 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
a28a5c8ff7
commit
3181857bc7
@ -87,12 +87,14 @@ spdk_log_register_trace_flag(const char *name, struct spdk_trace_flag *flag)
|
|||||||
|
|
||||||
if (name == NULL || flag == NULL) {
|
if (name == NULL || flag == NULL) {
|
||||||
SPDK_ERRLOG("missing spdk_trace_flag parameters\n");
|
SPDK_ERRLOG("missing spdk_trace_flag parameters\n");
|
||||||
abort();
|
assert(false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_trace_flag(name)) {
|
if (get_trace_flag(name)) {
|
||||||
SPDK_ERRLOG("duplicate spdk_trace_flag '%s'\n", name);
|
SPDK_ERRLOG("duplicate spdk_trace_flag '%s'\n", name);
|
||||||
abort();
|
assert(false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TAILQ_FOREACH(iter, &g_trace_flags, tailq) {
|
TAILQ_FOREACH(iter, &g_trace_flags, tailq) {
|
||||||
|
@ -223,18 +223,21 @@ spdk_poller_register(spdk_poller_fn fn,
|
|||||||
|
|
||||||
thread = spdk_get_thread();
|
thread = spdk_get_thread();
|
||||||
if (!thread) {
|
if (!thread) {
|
||||||
abort();
|
assert(false);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!thread->start_poller_fn || !thread->stop_poller_fn) {
|
if (!thread->start_poller_fn || !thread->stop_poller_fn) {
|
||||||
SPDK_ERRLOG("No related functions to start requested poller\n");
|
SPDK_ERRLOG("No related functions to start requested poller\n");
|
||||||
abort();
|
assert(false);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
poller = thread->start_poller_fn(thread->thread_ctx, fn, arg, period_microseconds);
|
poller = thread->start_poller_fn(thread->thread_ctx, fn, arg, period_microseconds);
|
||||||
if (!poller) {
|
if (!poller) {
|
||||||
SPDK_ERRLOG("Unable to start requested poller\n");
|
SPDK_ERRLOG("Unable to start requested poller\n");
|
||||||
abort();
|
assert(false);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return poller;
|
return poller;
|
||||||
|
Loading…
Reference in New Issue
Block a user