Add NO_STDERR flag.

This commit is contained in:
Todd C. Miller
2004-10-26 22:20:18 +00:00
parent 6c5550d13c
commit 899e22194e
2 changed files with 7 additions and 4 deletions

View File

@@ -395,10 +395,12 @@ log_error(va_alist)
/* /*
* Tell the user. * Tell the user.
*/ */
if (flags & USE_ERRNO) if (!ISSET(flags, NO_STDERR)) {
warn("%s", message); if (flags & USE_ERRNO)
else warn("%s", message);
warnx("%s", message); else
warnx("%s", message);
}
/* /*
* Send a copy of the error via mail. * Send a copy of the error via mail.

View File

@@ -34,6 +34,7 @@
#define USE_ERRNO 0x02 #define USE_ERRNO 0x02
#define NO_MAIL 0x04 #define NO_MAIL 0x04
#define NO_EXIT 0x08 #define NO_EXIT 0x08
#define NO_STDERR 0x10
/* /*
* Maximum number of characters to log per entry. The syslogger * Maximum number of characters to log per entry. The syslogger