From: Tom Rini Date: Wed, 22 Oct 2014 11:31:51 -0400 Subject: [U-Boot] [PATCH 01/19] lib: errno: introduce errno_str(): returns errno related message In-Reply-To: <1412801335-1591-2-git-send-email-p.marczak@samsung.com> References: <1412801335-1591-1-git-send-email-p.marczak@samsung.com> <1412801335-1591-2-git-send-email-p.marczak@samsung.com> Message-ID: <20141022153151.GF25506@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Oct 08, 2014 at 10:48:37PM +0200, Przemyslaw Marczak wrote: > The functions error's numbers are standarized - but the error > messages are not. > > The errors are often handled with unclear error messages, > so why not use an errno standarized messages. > > Advantages: > - This could decrease the binary size. > - Appended with a detailed information, > the error message will be clear. > > This commit introduces new function: > - const char *errno_to_str(int errno) > > The functions returns a pointer to the errno corresponding text message: > - if errno is null or positive number - a pointer to "Success" message > - if errno is negative - a pointer to errno related message > > Signed-off-by: Przemyslaw Marczak In and of itself, Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: