diff mbox series

[RFC,7/7] error reporting: HACKING: Say to use error_report_errno

Message ID 1524761612-5307-8-git-send-email-ian.jackson@eu.citrix.com
State New
Headers show
Series Introduce error_[v]report_errno[val] | expand

Commit Message

Ian Jackson April 26, 2018, 4:53 p.m. UTC
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 HACKING | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake April 26, 2018, 5:51 p.m. UTC | #1
On 04/26/2018 11:53 AM, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> ---
>  HACKING | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/HACKING b/HACKING
> index 4125c97..95563a3 100644
> --- a/HACKING
> +++ b/HACKING
> @@ -189,6 +189,7 @@ error_report() or error_vreport() from error-report.h.  This ensures the
>  error is reported in the right place (current monitor or stderr), and in
>  a uniform format.
>  
> +Use error_report_errno rather than open-coding calls to strerror().
>  Use error_printf() & friends to print additional information.

Our style is to write this as error_report_errno().  Or even copy the
approach used in the next line, stating 'error_report_errno() & friends'.
diff mbox series

Patch

diff --git a/HACKING b/HACKING
index 4125c97..95563a3 100644
--- a/HACKING
+++ b/HACKING
@@ -189,6 +189,7 @@  error_report() or error_vreport() from error-report.h.  This ensures the
 error is reported in the right place (current monitor or stderr), and in
 a uniform format.
 
+Use error_report_errno rather than open-coding calls to strerror().
 Use error_printf() & friends to print additional information.
 
 error_report() prints the current location.  In certain common cases