[PATCH 03/10] common: misc: remove now unused errno_str

Ahmad Fatoum a.fatoum at pengutronix.de
Sun Oct 9 23:11:15 PDT 2022


With all errno_str() instanced removed in a previous commit, we can drop
the now unused definition. New code should use

  printf("message: %m\n");

instead of

  printf("message: %s\n", errno_str());

or just use strerror(...) directly.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/misc.c   | 6 ------
 include/errno.h | 1 -
 2 files changed, 7 deletions(-)

diff --git a/common/misc.c b/common/misc.c
index 0c4bbe361db6..400c1fb48f9f 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -105,12 +105,6 @@ const char *strerror(int errnum)
 }
 EXPORT_SYMBOL(strerror);
 
-const char *errno_str(void)
-{
-	return strerror(errno);
-}
-EXPORT_SYMBOL(errno_str);
-
 void perror(const char *s)
 {
 #ifdef CONFIG_ERRNO_MESSAGES
diff --git a/include/errno.h b/include/errno.h
index 262c9fc3eb1c..164426596604 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -8,7 +8,6 @@
 extern int errno;
 
 void perror(const char *s);
-const char *errno_str(void);
 const char *strerror(int errnum);
 
 #endif /* __ERRNO_H */
-- 
2.30.2




More information about the barebox mailing list