| * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
| * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
| int logmode = LOGMODE_STDIO; |
| const char *msg_eol = "\n"; |
| void bb_verror_msg(const char *s, va_list p, const char* strerr) |
| /* va_copy is used because it is not portable |
| * to use va_list p twice */ |
| if (logmode & LOGMODE_STDIO) { |
| fprintf(stderr, "%s: ", applet_name); |
| fprintf(stderr, "%s%s%s", |
| if (ENABLE_FEATURE_SYSLOG && (logmode & LOGMODE_SYSLOG)) { |
| if (vasprintf(&msg, s, p2) < 0) |
| bb_error_msg_and_die(bb_msg_memory_exhausted); |
| syslog(LOG_ERR, "%s: %s", msg, strerr); |