Date: Wed, 27 Feb 2019 18:13:41 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344629 - head/usr.sbin/rtsold Message-ID: <201902271813.x1RIDf0D034823@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Feb 27 18:13:41 2019 New Revision: 344629 URL: https://svnweb.freebsd.org/changeset/base/344629 Log: rtsol: Use vwarnx(3) to log messages to standard error. This ensures that the program name is included in the output, which makes it easy to identify the source of error messages printed during boot. MFC after: 1 week Modified: head/usr.sbin/rtsold/rtsold.c Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Wed Feb 27 17:52:22 2019 (r344628) +++ head/usr.sbin/rtsold/rtsold.c Wed Feb 27 18:13:41 2019 (r344629) @@ -787,10 +787,8 @@ warnmsg(int priority, const char *func, const char *ms va_start(ap, msg); if (fflag) { - if (priority <= log_upto) { - (void)vfprintf(stderr, msg, ap); - (void)fprintf(stderr, "\n"); - } + if (priority <= log_upto) + vwarnx(msg, ap); } else { snprintf(buf, sizeof(buf), "<%s> %s", func, msg); msg = buf;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902271813.x1RIDf0D034823>