提交 f8e81d7e 编写于 作者: G Gregor Boirie 提交者: Jonathan Cameron

tools:iio:iio_generic_buffer: fix trigger-less mode

Passing the trigger-less mode option on the command line causes
iio_generic_buffer to fail searching for an IIO trigger.
Fix this by skipping trigger initialization if trigger-less mode is
requested.

Technically it actually fixes:
7c7e9dad where the bug was introduced but as the window to the patch
below that changes the context was very small let's mark it with that.
Signed-off-by: NGregor Boirie <gregor.boirie@parrot.com>
Fixes: deb4d1fd ("iio: generic_buffer: Fix --trigger-num option")
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 eafe5cfe
......@@ -456,7 +456,7 @@ int main(int argc, char **argv)
if (notrigger) {
printf("trigger-less mode selected\n");
} if (trig_num >= 0) {
} else if (trig_num >= 0) {
char *trig_dev_name;
ret = asprintf(&trig_dev_name, "%strigger%d", iio_dir, trig_num);
if (ret < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册