Re: [PATCH v2 1/2] ash: introduce ash_perror_msg_and_raise_error()

2017-07-25 Thread Johannes Schindelin
Hi Ron, On Sun, 23 Jul 2017, Ron Yorston wrote: > Johannes Schindelin wrote: > >@@ -1263,6 +1263,8 @@ ash_vmsg(const char *msg, va_list ap) > > fprintf(stderr, "line %d: ", startlinno); > > } > > vfprintf(stderr, msg, ap); > >+if (strerr) > >+

Re: [PATCH v2 1/2] ash: introduce ash_perror_msg_and_raise_error()

2017-07-23 Thread Ron Yorston
Johannes Schindelin wrote: >@@ -1263,6 +1263,8 @@ ash_vmsg(const char *msg, va_list ap) > fprintf(stderr, "line %d: ", startlinno); > } > vfprintf(stderr, msg, ap); >+ if (strerr) >+ vfprintf(stderr, ": ", strerr); >

[PATCH v2 1/2] ash: introduce ash_perror_msg_and_raise_error()

2017-07-19 Thread Johannes Schindelin
This new helper does the very same thing as ash_msg_and_raise_error() with one additional feature: if errno is not 0, it appends ": " (where is the output of strerror(errno)). Helped-by: Kang-Che Sung Signed-off-by: Johannes Schindelin ---