chiark / gitweb /
sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common...
[elogind.git] / src / core / swap.c
index 0384ebcdbbdf4db3fbb31dcdbb73c95564381337..a6a23554c9f38a4c960af600a4ede4ef6924cc08 100644 (file)
@@ -35,7 +35,7 @@
 #include "unit-name.h"
 #include "dbus-swap.h"
 #include "special.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "exit-status.h"
 #include "def.h"
 #include "path-util.h"
@@ -410,7 +410,7 @@ static int swap_add_one(
         return 0;
 
 fail:
-        log_unit_warning(e, "Failed to load swap unit: %s", strerror(-r));
+        log_unit_warning_errno(e, r, "Failed to load swap unit: %m");
 
         if (delete && u)
                 unit_free(u);
@@ -1170,7 +1170,7 @@ static int swap_dispatch_io(sd_event_source *source, int fd, uint32_t revents, v
 
         r = swap_load_proc_swaps(m, true);
         if (r < 0) {
-                log_error_errno(-r, "Failed to reread /proc/swaps: %m");
+                log_error_errno(r, "Failed to reread /proc/swaps: %m");
 
                 /* Reset flags, just in case, for late calls */
                 LIST_FOREACH(units_by_type, u, m->units_by_type[UNIT_SWAP]) {