X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libbb%2Fperror_msg.c;h=6c8e1b51ef8cfca1cf984f4301b2783644eb5141;hb=dcc921e3ca1d2e30d69cd2209d2c427e78a32a30;hp=2ec1a9b2acd3efeb05661897c0b51fbea67fe9ef;hpb=0e2c9fb4e09fb0c5a47ddc74b0ba53238570599e;p=oweals%2Fbusybox.git diff --git a/libbb/perror_msg.c b/libbb/perror_msg.c index 2ec1a9b2a..6c8e1b51e 100644 --- a/libbb/perror_msg.c +++ b/libbb/perror_msg.c @@ -9,15 +9,17 @@ #include "libbb.h" -void bb_perror_msg(const char *s, ...) +void FAST_FUNC bb_perror_msg(const char *s, ...) { va_list p; va_start(p, s); /* Guard against ": 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); } + +void FAST_FUNC bb_simple_perror_msg(const char *s) +{ + bb_perror_msg("%s", s); +}