linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2015-07-06 22:36 Cristina Opriceana
  2015-07-06 23:03 ` Cristina Opriceana
  0 siblings, 1 reply; 2+ messages in thread
From: Cristina Opriceana @ 2015-07-06 22:36 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta,
	octavian.purdila, julia.lawall

linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
daniel.baluta@intel.com, octavian.purdila@intel.com,
julia.lawall@lip6.fr
Bcc: 
Subject: [PATCH 0/4] tools: iio: Send error messages to stderr
Message-ID: <cover.1436220932.git.cristina.opriceana@gmail.com>
Reply-To: 

This patchset indends to make some cleanup and send printf
error messages to stderr.
The changes were performed with coccinelle for failiure
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)
)

Cristina Opriceana (4):
  tools: iio: Move printf failiure messages to stderr
  tools: iio: Send usage error messages to stderr
  tools: iio: generic_buffer: Maintain fprintf() messages consistent
  tools: iio: 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] 2+ messages in thread

* (no subject)
  2015-07-06 22:36 Cristina Opriceana
@ 2015-07-06 23:03 ` Cristina Opriceana
  0 siblings, 0 replies; 2+ messages in thread
From: Cristina Opriceana @ 2015-07-06 23:03 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta,
	octavian.purdila, julia.lawall

On Ma, 2015-07-07 at 01:36 +0300, Cristina Opriceana wrote:
> linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
> daniel.baluta@intel.com, octavian.purdila@intel.com,
> julia.lawall@lip6.fr
> Bcc: 
> Subject: [PATCH 0/4] tools: iio: Send error messages to stderr
> Message-ID: <cover.1436220932.git.cristina.opriceana@gmail.com>
> Reply-To: 
> 
> This patchset indends to make some cleanup and send printf
> error messages to stderr.
> The changes were performed with coccinelle for failiure
> messages and manual for other cases. The following script
> was used:

This patch got malformed. Please ignore it.

Cristina


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

end of thread, other threads:[~2015-07-06 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 22:36 Cristina Opriceana
2015-07-06 23:03 ` Cristina Opriceana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).