Skip to content

Commit

Permalink
tools:iio:iio_generic_buffer: fix trigger-less mode
Browse files Browse the repository at this point in the history
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:
7c7e9da 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: Gregor Boirie <[email protected]>
Fixes: deb4d1f ("iio: generic_buffer: Fix --trigger-num option")
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
grgbr authored and jic23 committed Aug 29, 2016
1 parent eafe5cf commit f8e81d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/iio/iio_generic_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f8e81d7

Please sign in to comment.