svn commit: trunk/busybox: include libbb
vda at busybox.net
vda at busybox.net
Wed Aug 15 13:07:54 PDT 2007
Author: vda
Date: 2007-08-15 13:07:53 -0700 (Wed, 15 Aug 2007)
New Revision: 19518
Log:
v[hp]error_msg have 2-3 callsites only -> incorporate there.
Removed:
trunk/busybox/libbb/vherror_msg.c
trunk/busybox/libbb/vperror_msg.c
Modified:
trunk/busybox/include/libbb.h
trunk/busybox/libbb/Kbuild
trunk/busybox/libbb/herror_msg.c
trunk/busybox/libbb/herror_msg_and_die.c
trunk/busybox/libbb/perror_msg.c
trunk/busybox/libbb/perror_msg_and_die.c
trunk/busybox/libbb/xfuncs.c
Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/include/libbb.h 2007-08-15 20:07:53 UTC (rev 19518)
@@ -649,15 +649,12 @@
extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
-extern void bb_vherror_msg(const char *s, va_list p);
extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN;
extern void bb_perror_nomsg(void);
extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
-/* These are used internally -- you shouldn't need to use them */
extern void bb_verror_msg(const char *s, va_list p, const char *strerr);
-extern void bb_vperror_msg(const char *s, va_list p);
/* applets which are useful from another applets */
Modified: trunk/busybox/libbb/Kbuild
===================================================================
--- trunk/busybox/libbb/Kbuild 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/Kbuild 2007-08-15 20:07:53 UTC (rev 19518)
@@ -87,8 +87,6 @@
lib-y += vdprintf.o
lib-y += verror_msg.o
lib-y += vfork_daemon_rexec.o
-lib-y += vherror_msg.o
-lib-y += vperror_msg.o
lib-y += warn_ignoring_args.o
lib-y += wfopen.o
lib-y += wfopen_input.o
Modified: trunk/busybox/libbb/herror_msg.c
===================================================================
--- trunk/busybox/libbb/herror_msg.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/herror_msg.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -14,6 +14,6 @@
va_list p;
va_start(p, s);
- bb_vherror_msg(s, p);
+ bb_verror_msg(s, p, hstrerror(h_errno));
va_end(p);
}
Modified: trunk/busybox/libbb/herror_msg_and_die.c
===================================================================
--- trunk/busybox/libbb/herror_msg_and_die.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/herror_msg_and_die.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -14,7 +14,7 @@
va_list p;
va_start(p, s);
- bb_vherror_msg(s, p);
+ bb_verror_msg(s, p, hstrerror(h_errno));
va_end(p);
xfunc_die();
}
Modified: trunk/busybox/libbb/perror_msg.c
===================================================================
--- trunk/busybox/libbb/perror_msg.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/perror_msg.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -15,9 +15,6 @@
va_start(p, s);
/* Guard against "<error message>: Success" */
- if (!errno)
- bb_verror_msg(s, p, NULL);
- else
- bb_vperror_msg(s, p);
+ bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
va_end(p);
}
Modified: trunk/busybox/libbb/perror_msg_and_die.c
===================================================================
--- trunk/busybox/libbb/perror_msg_and_die.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/perror_msg_and_die.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -15,10 +15,7 @@
va_start(p, s);
/* Guard against "<error message>: Success" */
- if (!errno)
- bb_verror_msg(s, p, NULL);
- else
- bb_vperror_msg(s, p);
+ bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
va_end(p);
xfunc_die();
}
Deleted: trunk/busybox/libbb/vherror_msg.c
===================================================================
--- trunk/busybox/libbb/vherror_msg.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/vherror_msg.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -1,15 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen at codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void bb_vherror_msg(const char *s, va_list p)
-{
- bb_verror_msg(s, p, hstrerror(h_errno));
-}
Deleted: trunk/busybox/libbb/vperror_msg.c
===================================================================
--- trunk/busybox/libbb/vperror_msg.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/vperror_msg.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -1,15 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen at codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void bb_vperror_msg(const char *s, va_list p)
-{
- bb_verror_msg(s, p, strerror(errno));
-}
Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c 2007-08-15 20:05:37 UTC (rev 19517)
+++ trunk/busybox/libbb/xfuncs.c 2007-08-15 20:07:53 UTC (rev 19518)
@@ -648,7 +648,7 @@
if (ioctl(fd, request, argp) < 0) {
va_start(p, fmt);
- bb_vperror_msg(fmt, p);
+ bb_verror_msg(fmt, p, strerror(errno));
/* xfunc_die can actually longjmp, so be nice */
va_end(p);
xfunc_die();
@@ -662,7 +662,7 @@
if (ret < 0) {
va_start(p, fmt);
- bb_vperror_msg(fmt, p);
+ bb_verror_msg(fmt, p, strerror(errno));
va_end(p);
}
return ret;
More information about the busybox-cvs
mailing list