All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] tools: iio: Send error messages to stderr
@ 2015-07-10 10:50 Cristina Opriceana
  2015-07-10 10:56 ` [PATCH v2 1/4] tools: iio: Move printf failure " Cristina Opriceana
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Cristina Opriceana @ 2015-07-10 10:50 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta,
	octavian.purdila, julia.lawall

This patchset 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. The following script
was used:

@r@
expression e1, e2, stdout;
@@
(printf(e1);
|
printf(e1, e2);
|
fprintf(stdout, e1);
|
fprintf(stdout, e1, e2);
)
@script: python get_string@
e << r.e1;
tdres;
@@
if 'could not' in e.lower() or 'fail' in e.lower() \
or 'problem' in e.lower() or 'not set' in e.lower():
coccinelle.tdres = e
else:
cocci.include_match(False)
@r_match@
expression r.stdout, r.e1, r.e2;
identifier get_string.tdres;
@@
(
- printf(e1);
+ fprintf(stderr, tdres);
|
- printf(e1, e2);
+ fprintf(stderr, tdres, e2);
|
- fprintf(stdout, e1)
+ fprintf(stderr, tdres)
|
- fprintf(stdout, e1, e2)
+ fprintf(stderr, tdres, e2)
)

Changes in v2:
	- s/failiure/failure

Cristina Opriceana (4):
  tools: iio: Move printf failure messages to stderr
  tools: iio: Send usage error messages to stderr
  tools: iio: generic_buffer: Maintain fprintf() messages consistent
  iio: tools: iio_utils: Move general error messages to stderr

 tools/iio/generic_buffer.c    | 21 ++++++++++--------
 tools/iio/iio_event_monitor.c |  8 +++----
 tools/iio/iio_utils.c         | 51 +++++++++++++++++++++++++------------------
 tools/iio/lsiio.c             |  2 +-
 4 files changed, 47 insertions(+), 35 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-07-13  9:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 10:50 [PATCH v2 0/4] tools: iio: Send error messages to stderr Cristina Opriceana
2015-07-10 10:56 ` [PATCH v2 1/4] tools: iio: Move printf failure " Cristina Opriceana
2015-07-10 21:42   ` Hartmut Knaack
2015-07-12 11:38     ` Cristina Georgiana Opriceana
2015-07-12 12:20       ` Julia Lawall
2015-07-13  9:30         ` Jonathan Cameron
2015-07-12 13:07       ` Hartmut Knaack
2015-07-12 13:57         ` Cristina Georgiana Opriceana
2015-07-13  9:36         ` Jonathan Cameron
2015-07-10 10:59 ` [PATCH v2 2/4] tools: iio: Send usage error " Cristina Opriceana
2015-07-10 11:01 ` [PATCH v2 3/4] tools: iio: generic_buffer: Maintain fprintf() messages consistent Cristina Opriceana
2015-07-10 11:03 ` [PATCH v2 4/4] iio: tools: iio_utils: Move general error messages to stderr Cristina Opriceana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.