if (r == -EISDIR)
return r;
- log_error("Failed to load %s: %s", path, strerror(-r));
- return r;
+ return log_error_errno(r, "Failed to load %s: %m", path);
}
q = c;
int t;
t = xml_tokenize(&q, &name, &xml_state, &line);
- if (t < 0) {
- log_error("XML parse failure in %s: %s", path, strerror(-t));
- return t;
- }
+ if (t < 0)
+ return log_error_errno(t, "XML parse failure in %s: %m", path);
switch (state) {
r = get_user_creds(&u, &i->uid, NULL, NULL, NULL);
if (r < 0) {
- log_error("Failed to resolve user %s, ignoring policy: %s", u, strerror(-r));
+ log_error_errno(r, "Failed to resolve user %s, ignoring policy: %m", u);
free(i);
} else {
PolicyItem *first;
r = get_group_creds(&g, &i->gid);
if (r < 0) {
- log_error("Failed to resolve group %s, ignoring policy: %s", g, strerror(-r));
+ log_error_errno(r, "Failed to resolve group %s, ignoring policy: %m", g);
free(i);
} else {
PolicyItem *first;
r = get_user_creds(&u, &i->uid, NULL, NULL, NULL);
if (r < 0)
- log_error("Failed to resolve user %s: %s", name, strerror(-r));
+ log_error_errno(r, "Failed to resolve user %s: %m", name);
else
i->uid_valid = true;
}
r = get_group_creds(&g, &i->gid);
if (r < 0)
- log_error("Failed to resolve group %s: %s", name, strerror(-r));
+ log_error_errno(r, "Failed to resolve group %s: %m", name);
else
i->gid_valid = true;
}
char **j;
r = conf_files_list(&l, ".conf", NULL, *i, NULL);
- if (r < 0) {
- log_error("Failed to get configuration file list: %s", strerror(-r));
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to get configuration file list: %m");
STRV_FOREACH(j, l)
file_load(p, *j);