← Commit list

7e1bb4bc5

Denys Vlasenko
Denys Vlasenko
2010-07-04
FAILED Duration: 40s

Subject

libbb: reduce number of *error_msg[_and_die].c files by four

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/Kbuild.src+0 -4
@@ -32,8 +32,6 @@ lib-y += create_icmp_socket.o
lib-y += default_error_retval.o
lib-y += device_open.o
lib-y += dump.o
-lib-y += error_msg.o
-lib-y += error_msg_and_die.o
lib-y += execable.o
lib-y += fclose_nonstdin.o
lib-y += fflush_stdout_and_exit.o
@@ -48,7 +46,6 @@ lib-y += getopt32.o
lib-y += getpty.o
lib-y += get_volsize.o
lib-y += herror_msg.o
-lib-y += herror_msg_and_die.o
lib-y += human_readable.o
lib-y += inet_common.o
lib-y += info_msg.o
@@ -72,7 +69,6 @@ lib-y += obscure.o
lib-y += parse_mode.o
lib-y += parse_config.o
lib-y += perror_msg.o
-lib-y += perror_msg_and_die.o
lib-y += perror_nomsg.o
lib-y += perror_nomsg_and_die.o
lib-y += pidfile.o
libbb/error_msg.c+0 -19
@@ -1,19 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void FAST_FUNC bb_error_msg(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- bb_verror_msg(s, p, NULL);
- va_end(p);
-}
libbb/error_msg_and_die.c+0 -20
@@ -1,20 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void FAST_FUNC bb_error_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- bb_verror_msg(s, p, NULL);
- va_end(p);
- xfunc_die();
-}
libbb/herror_msg.c+10 -1
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-
#include "libbb.h"
void FAST_FUNC bb_herror_msg(const char *s, ...)
@@ -17,3 +16,13 @@ void FAST_FUNC bb_herror_msg(const char *s, ...)
bb_verror_msg(s, p, hstrerror(h_errno));
va_end(p);
}
+
+void FAST_FUNC bb_herror_msg_and_die(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ bb_verror_msg(s, p, hstrerror(h_errno));
+ va_end(p);
+ xfunc_die();
+}
libbb/herror_msg_and_die.c+0 -20
@@ -1,20 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void FAST_FUNC bb_herror_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- bb_verror_msg(s, p, hstrerror(h_errno));
- va_end(p);
- xfunc_die();
-}
libbb/perror_msg.c+16 -1
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-
#include "libbb.h"
void FAST_FUNC bb_perror_msg(const char *s, ...)
@@ -19,7 +18,23 @@ void FAST_FUNC bb_perror_msg(const char *s, ...)
va_end(p);
}
+void FAST_FUNC bb_perror_msg_and_die(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ /* Guard against "<error message>: Success" */
+ bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
+ va_end(p);
+ xfunc_die();
+}
+
void FAST_FUNC bb_simple_perror_msg(const char *s)
{
bb_perror_msg("%s", s);
}
+
+void FAST_FUNC bb_simple_perror_msg_and_die(const char *s)
+{
+ bb_perror_msg_and_die("%s", s);
+}
libbb/perror_msg_and_die.c+0 -26
@@ -1,26 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void FAST_FUNC bb_perror_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- /* Guard against "<error message>: Success" */
- bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
- va_end(p);
- xfunc_die();
-}
-
-void FAST_FUNC bb_simple_perror_msg_and_die(const char *s)
-{
- bb_perror_msg_and_die("%s", s);
-}
libbb/verror_msg.c+20 -3
@@ -76,12 +76,9 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr)
free(msg);
}
-
#ifdef VERSION_WITH_WRITEV
-
/* Code size is approximately the same, but currently it's the only user
* of writev in entire bbox. __libc_writev in uclibc is ~50 bytes. */
-
void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr)
{
int strerr_len, msgeol_len;
@@ -139,3 +136,23 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr)
free(msgc);
}
#endif
+
+
+void FAST_FUNC bb_error_msg_and_die(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ bb_verror_msg(s, p, NULL);
+ va_end(p);
+ xfunc_die();
+}
+
+void FAST_FUNC bb_error_msg(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ bb_verror_msg(s, p, NULL);
+ va_end(p);
+}