From 59345b1f0f9941d32b45d0e27401355b34106357 Mon Sep 17 00:00:00 2001 From: Przemyslaw Marczak Date: Wed, 8 Oct 2014 22:48:37 +0200 Subject: lib: errno: introduce errno_str(): returns errno related message 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 Reviewed-by: Tom Rini --- lib/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Makefile') diff --git a/lib/Makefile b/lib/Makefile index 3ceb697..07d175f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -51,6 +51,7 @@ endif obj-$(CONFIG_ADDR_MAP) += addr_map.o obj-y += hashtable.o obj-y += errno.o +obj-$(CONFIG_ERRNO_STR) += errno_str.o obj-y += display_options.o obj-$(CONFIG_BCH) += bch.o obj-y += crc32.o -- cgit v1.1