mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.biessmann@corscience.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] flashbench: print strerror(3)
Date: Thu, 20 Feb 2014 13:42:18 +0100	[thread overview]
Message-ID: <5305F82A.5080907@corscience.de> (raw)
In-Reply-To: <1381834722-20966-1-git-send-email-andreas@biessmann.de>


[-- Attachment #1.1: Type: text/plain, Size: 2916 bytes --]

ping ...

On 10/15/2013 12:58 PM, Andreas Bießmann wrote:
> flashbench may end without any comment on error in setup (mostly ENOMEM on
> allocating scratch buffer).
> To avoid others searching again add strerror(3) to give a hint to the user.
> 
> Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
> ---
>  .../0003-flashbench-printout-error.patch           |   33 ++++++++++++++++++++
>  patches/flashbench-20120222/series                 |    3 +-
>  2 files changed, 35 insertions(+), 1 deletion(-)
>  create mode 100644 patches/flashbench-20120222/0003-flashbench-printout-error.patch
> 
> diff --git a/patches/flashbench-20120222/0003-flashbench-printout-error.patch b/patches/flashbench-20120222/0003-flashbench-printout-error.patch
> new file mode 100644
> index 0000000..63c7453
> --- /dev/null
> +++ b/patches/flashbench-20120222/0003-flashbench-printout-error.patch
> @@ -0,0 +1,33 @@
> +From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <andreas.biessmann@corscience.de>
> +Date: Tue, 15 Oct 2013 12:37:48 +0200
> +Subject: [PATCH] flashbench: printout error
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +In order to get a clue _what_ happened printout the error string.
> +
> +Signed-off-by: Andreas Bießmann <andreas.biessmann@corscience.de>
> +---
> + flashbench.c |    8 +++++++-
> + 1 file changed, 7 insertions(+), 1 deletion(-)
> +
> +diff --git a/flashbench.c b/flashbench.c
> +index 0a1016f..5b553c7 100644
> +--- a/flashbench.c
> ++++ b/flashbench.c
> +@@ -19,7 +19,13 @@
> + 
> + typedef long long ns_t;
> + 
> +-#define returnif(x) do { typeof(x) __x = (x); if (__x < 0) return (__x); } while (0)
> ++#define returnif(x) do {                                                      \
> ++	typeof(x) __x = (x);                                                      \
> ++	if (__x < 0) {                                                            \
> ++		fprintf(stderr, "flashbench: internal error '%s'\n", strerror(-__x)); \
> ++		return (__x);                                                         \
> ++	}                                                                         \
> ++	} while (0)
> + 
> + static ns_t ns_min(int count, ns_t data[])
> + {
> diff --git a/patches/flashbench-20120222/series b/patches/flashbench-20120222/series
> index b63b21f..82de47c 100644
> --- a/patches/flashbench-20120222/series
> +++ b/patches/flashbench-20120222/series
> @@ -2,4 +2,5 @@
>  #tag:base --start-number 1
>  0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
>  0002-Add-lrt-to-LDLIBS-instead-of-LDFLAGS.patch
> -# fa6c1da743f5dd6808f0f1b887b31657  - git-ptx-patches magic
> +0003-flashbench-printout-error.patch
> +# 429c331f680c7d428505b255597dd1f0  - git-ptx-patches magic
> 

anything wrong with this patchset?

Best regards

Andreas Bießmann


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-02-20 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 10:58 Andreas Bießmann
2014-02-20 12:42 ` Andreas Bießmann [this message]
2014-04-23 10:02 ` Andreas Bießmann
2014-04-23 12:52   ` Michael Olbrich
2014-04-26 13:42     ` Bernhard Walle
2014-04-26 13:37   ` Bernhard Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5305F82A.5080907@corscience.de \
    --to=andreas.biessmann@corscience.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox