[RFC 5/7] iio: generic_buffer: Use current_trigger_id

From: Crestez Dan Leonard
Date: Mon May 23 2016 - 14:40:46 EST


This is a preferred alternative to 'current_trigger'.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@xxxxxxxxx>
---
tools/iio/generic_buffer.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index e8c3052..b23371a 100644
--- a/tools/iio/generic_buffer.c
+++ b/tools/iio/generic_buffer.c
@@ -582,12 +582,12 @@ int main(int argc, char **argv)
* Set the device trigger to be the data ready trigger found
* above
*/
- ret = write_sysfs_string_and_verify("trigger/current_trigger",
- dev_dir_name,
- trigger_name);
+ ret = write_sysfs_int_and_verify("trigger/current_trigger_id",
+ dev_dir_name,
+ trig_num);
if (ret < 0) {
fprintf(stderr,
- "Failed to write current_trigger file\n");
+ "Failed to write current_trigger_id file\n");
goto error;
}
}
--
2.5.5