lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 7 Jul 2015 11:10:28 +0300
From:	Daniel Baluta <daniel.baluta@...el.com>
To:	Cristina Opriceana <cristina.opriceana@...il.com>
Cc:	Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald <pmeerw@...erw.net>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Daniel Baluta <daniel.baluta@...el.com>,
	"octavian.purdila@...el.com" <octavian.purdila@...el.com>,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 0/4] tools: iio: Send error messages to stderr

On Tue, Jul 7, 2015 at 1:46 AM, Cristina Opriceana
<cristina.opriceana@...il.com> wrote:
> 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)
> )

Nit: s/failiure/failure this appears in several places.

With this fixed:

Reviewed-by: Daniel Baluta <daniel.baluta@...el.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ