On Fri, 27.03.15 12:36, Tom Gundersen (t...@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
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to