X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.cpp;fp=src%2Flib%2Flttng-ctl%2Flttng-ctl.cpp;h=63841df403f249d5aeb681ce81a0ec671b7d4242;hp=d4ec1c81b81bcd8886e07054fc5cbf1ef5ac993e;hb=8346beb68a50caf0b63edaca526250c0068f66d3;hpb=741ecffbe095ebf26b5c217896786f7f52ff2b15 diff --git a/src/lib/lttng-ctl/lttng-ctl.cpp b/src/lib/lttng-ctl/lttng-ctl.cpp index d4ec1c81b..63841df40 100644 --- a/src/lib/lttng-ctl/lttng-ctl.cpp +++ b/src/lib/lttng-ctl/lttng-ctl.cpp @@ -1769,10 +1769,14 @@ int lttng_list_syscalls(struct lttng_event **events) /* * Returns a human readable string describing - * the error code (a negative value). + * the error code (positive or negative value). */ const char *lttng_strerror(int code) { + if (code > 0) { + code = -code; + } + return error_get_str(code); }