On Wed, Jul 24, 2019 at 09:25:57PM +0200, Klemens Nanni wrote:
> This snuck through
>
>       revision 1.84
>       date: 2018/12/04 18:00:57;  author: tedu;  state: Exp;  lines: +44 -30;
>       redo the debug logging to be more like everything else.
>       ok kn
>
> Where the direct syslog(3) call was replaced with a logmsg() wrapper
> which uses printf(2) in case `-d' was passed.

There is one more %m:

                logmsg(LOG_ERR, "cannot fetch power status: %m");

bluhm

> Index: apmd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v
> retrieving revision 1.86
> diff -u -p -r1.86 apmd.c
> --- apmd.c    22 Jul 2019 08:06:52 -0000      1.86
> +++ apmd.c    24 Jul 2019 19:23:41 -0000
> @@ -683,7 +683,7 @@ do_etc_file(const char *file)
>       case 0:
>               /* We are the child. */
>               execl(file, prog, (char *)NULL);
> -             logmsg(LOG_ERR, "failed to exec %s: %m", file, strerror(errno));
> +             logmsg(LOG_ERR, "failed to exec %s: %s", file, strerror(errno));
>               _exit(1);
>               /* NOTREACHED */
>       default:

Reply via email to