[PATCH v2 2/4] tools: iio: Send usage error messages to stderr

From: Cristina Opriceana
Date: Fri Jul 10 2015 - 07:00:19 EST


Incorrect usage messages should be sent to stderr.

Signed-off-by: Cristina Opriceana <cristina.opriceana@xxxxxxxxx>
---
tools/iio/generic_buffer.c | 2 +-
tools/iio/iio_event_monitor.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index 2f4e12f..af350cc 100644
--- a/tools/iio/generic_buffer.c
+++ b/tools/iio/generic_buffer.c
@@ -193,7 +193,7 @@ void process_scan(char *data,

void print_usage(void)
{
- printf("Usage: generic_buffer [options]...\n"
+ fprintf(stderr, "Usage: generic_buffer [options]...\n"
"Capture, convert and output data from IIO device buffer\n"
" -c <n> Do n conversions\n"
" -e Disable wait for event (new data)\n"
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index 843bc4c..1c138fc 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -251,7 +251,7 @@ int main(int argc, char **argv)
int fd, event_fd;

if (argc <= 1) {
- printf("Usage: %s <device_name>\n", argv[0]);
+ fprintf(stderr, "Usage: %s <device_name>\n", argv[0]);
return -1;
}

--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/