X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsigrok.c;h=487f31a1b8030edbb299affb87368849d743064c;hb=0ba2f3a1a1db4ed7ce6f990b22b9605e19fc7ab9;hp=eecb54c8c5fd8c1ad8a607358925d1510cdbe233;hpb=0beb06563c5681975fd4f743c547e15f4facb29f;p=collectd.git diff --git a/src/sigrok.c b/src/sigrok.c index eecb54c8..487f31a1 100644 --- a/src/sigrok.c +++ b/src/sigrok.c @@ -360,10 +360,13 @@ static int sigrok_init(void) return -1; } - if ((status = plugin_thread_create(&sr_thread, NULL, sigrok_read_thread, - NULL)) != 0) { + status = plugin_thread_create(&sr_thread, NULL, sigrok_read_thread, + NULL); + if (status != 0) + { + char errbuf[1024]; ERROR("sigrok plugin: Failed to create thread: %s.", - strerror(status)); + sstrerror (errno, errbuf, sizeof (errbuf))); return -1; } sr_thread_running = TRUE;