X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsigrok.c;h=1a0536ad4f3cd6797f198063af3eaf89e02948ca;hb=3e413a72f2387d600fa00169823c7ce0d0b649b5;hp=ba3e4062f0e9519544858ce982c0fc22c921a012;hpb=51612a1b2f96f6e360f874f6da0b20eac94f48b3;p=collectd.git diff --git a/src/sigrok.c b/src/sigrok.c index ba3e4062..1a0536ad 100644 --- a/src/sigrok.c +++ b/src/sigrok.c @@ -357,10 +357,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;