projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add tests for gunzip
[oweals/busybox.git]
/
libbb
/
perror_msg.c
diff --git
a/libbb/perror_msg.c
b/libbb/perror_msg.c
index 7fb0830be35d80d41948193c44d3493e2132fc69..af9ff5949804029f116ea36d20a906b085820b8b 100644
(file)
--- a/
libbb/perror_msg.c
+++ b/
libbb/perror_msg.c
@@
-7,10
+7,6
@@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
#include "libbb.h"
void bb_perror_msg(const char *s, ...)
#include "libbb.h"
void bb_perror_msg(const char *s, ...)
@@
-18,6
+14,12
@@
void bb_perror_msg(const char *s, ...)
va_list p;
va_start(p, s);
va_list p;
va_start(p, s);
- bb_vperror_msg(s, p);
+ /* Guard against "<error message>: Success" */
+ bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
va_end(p);
}
va_end(p);
}
+
+void bb_simple_perror_msg(const char *s)
+{
+ bb_perror_msg("%s", s);
+}