tools: iio: Send error messages to stderr

This patch indends to make some cleanup and send printf
error messages to stderr. The changes were performed with coccinelle
for failure messages and manual for other cases, such as wrong usage
messages.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Cristina Opriceana
2015-07-17 18:43:42 +03:00
committed by Jonathan Cameron
parent 34cbea1908
commit d9abc615ea
4 changed files with 59 additions and 47 deletions

View File

@@ -108,7 +108,7 @@ static int dump_devices(void)
dp = opendir(iio_dir);
if (!dp) {
printf("No industrial I/O devices available\n");
fprintf(stderr, "No industrial I/O devices available\n");
return -ENODEV;
}