/* Anybody can send us invalid messages, let's just drop them. */
if (r == -EBADMSG || r == -EPROTOTYPE)
- log_debug("Ignoring invalid message: %s", strerror(-r));
+ log_debug_errno(-r, "Ignoring invalid message: %m");
else
return r;
}
/* Anybody can send us invalid messages, let's just drop them. */
if (r == -EBADMSG || r == -EPROTOTYPE) {
- log_debug("Ignoring invalid message: %s", strerror(-r));
+ log_debug_errno(-r, "Ignoring invalid message: %m");
r = 0;
}
* line option, however. */
r = get_proc_cmdline_key("systemd.kdbus_attach_flags_mask=", &mask);
- if (r < 0) {
- log_warning_errno(-r, "Failed to read kernel command line: %m");
- return r;
- }
+ if (r < 0)
+ return log_warning_errno(r, "Failed to read kernel command line: %m");
if (mask) {
const char *p = mask;
sprintf(buf, "0x%" PRIx64 "\n", m);
r = write_string_file("/sys/module/kdbus/parameters/attach_flags_mask", buf);
- if (r < 0) {
- log_warning_errno(-r, "Failed to write kdbus attach mask: %m");
- return r;
- }
+ if (r < 0)
+ return log_full_errno(
+ r == -EROFS ? LOG_DEBUG : LOG_WARNING, r,
+ "Failed to write kdbus attach mask: %m");
return 0;
}