chiark / gitweb /
treewide: auto-convert the simple cases to log_*_errno()
[elogind.git] / src / bus-proxyd / bus-policy.c
index 3cfe9befb2ffc70876264bcafec8403591b762d2..9a83efe8458247fe4485f149818cfed9fde5ccba 100644 (file)
@@ -95,7 +95,7 @@ static int file_load(Policy *p, const char *path) {
                 if (r == -EISDIR)
                         return r;
 
-                log_error("Failed to load %s: %s", path, strerror(-r));
+                log_error_errno(-r, "Failed to load %s: %m", path);
                 return r;
         }
 
@@ -106,7 +106,7 @@ static int file_load(Policy *p, const char *path) {
 
                 t = xml_tokenize(&q, &name, &xml_state, &line);
                 if (t < 0) {
-                        log_error("XML parse failure in %s: %s", path, strerror(-t));
+                        log_error_errno(-t, "XML parse failure in %s: %m", path);
                         return t;
                 }
 
@@ -358,7 +358,7 @@ static int file_load(Policy *p, const char *path) {
 
                                         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;
@@ -390,7 +390,7 @@ static int file_load(Policy *p, const char *path) {
 
                                         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;
@@ -533,7 +533,7 @@ static int file_load(Policy *p, const char *path) {
 
                                                 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;
                                         }
@@ -544,7 +544,7 @@ static int file_load(Policy *p, const char *path) {
 
                                                 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;
                                         }
@@ -895,7 +895,7 @@ int policy_load(Policy *p, char **files) {
 
                         r = conf_files_list(&l, ".conf", NULL, *i, NULL);
                         if (r < 0) {
-                                log_error("Failed to get configuration file list: %s", strerror(-r));
+                                log_error_errno(-r, "Failed to get configuration file list: %m");
                                 return r;
                         }