[systemd-devel] [PATCH] automount: add expire support

Lennart Poettering lennart at poettering.net
Thu Apr 2 03:56:12 PDT 2015


On Fri, 27.03.15 12:36, Tom Gundersen (teg at jklm.no) wrote:

> > +        if (errno != EAGAIN)
> > +                log_error_errno(errno, "failed to expire automount: %m");
> 
> No need for this, it is equivalent to
>                       log_error("failed to exprie automount: %m");

Not true really. log_error_errno() also adds ERRNO= structured fields
to the log message, the simply log_error() does not. 

Hence, if your are logging about some system error indicated in an
Exyz error code, please use log_error_errno(), regardless if you got
the errror via errno or via the return value of a function...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list