chiark / gitweb /
treewide: use log_*_errno whenever %m is in the format string
[elogind.git] / src / core / cgroup.c
index c24bfc8d33f34f848f36e6aca2ed4bc5fddb53ac..382e6a6ccc6fd7d3408bd58743bb34191f181386 100644 (file)
@@ -154,7 +154,7 @@ static int lookup_blkio_device(const char *p, dev_t *dev) {
 
         r = stat(p, &st);
         if (r < 0) {
-                log_warning("Couldn't stat device %s: %m", p);
+                log_warning_errno(errno, "Couldn't stat device %s: %m", p);
                 return -errno;
         }
 
@@ -219,7 +219,7 @@ static int whitelist_major(const char *path, const char *name, char type, const
 
         f = fopen("/proc/devices", "re");
         if (!f) {
-                log_warning("Cannot open /proc/devices to resolve %s (%c): %m", name, type);
+                log_warning_errno(errno, "Cannot open /proc/devices to resolve %s (%c): %m", name, type);
                 return -errno;
         }
 
@@ -280,7 +280,7 @@ static int whitelist_major(const char *path, const char *name, char type, const
         return 0;
 
 fail:
-        log_warning("Failed to read /proc/devices: %m");
+        log_warning_errno(errno, "Failed to read /proc/devices: %m");
         return -errno;
 }
 
@@ -906,7 +906,7 @@ int manager_setup_cgroup(Manager *m) {
 
                 m->pin_cgroupfs_fd = open(path, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY|O_NONBLOCK);
                 if (m->pin_cgroupfs_fd < 0) {
-                        log_error("Failed to open pin file: %m");
+                        log_error_errno(errno, "Failed to open pin file: %m");
                         return -errno;
                 }