X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fswap.c;h=346a5fd7121af758c973fd06e3b71fbbb8594f58;hb=8c8549db376ce9325e5a7547959ab7d9218505b7;hp=fd16104ebbed286f451f14af65da08956997f35b;hpb=79008bddf679a5e0900369950eb346c9fa687107;p=elogind.git diff --git a/src/core/swap.c b/src/core/swap.c index fd16104eb..346a5fd71 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -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("Failed to reread /proc/swaps: %s", strerror(-r)); + 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]) {