diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c index 51f64aa2b19..d1f74923170 100644 --- a/src/shared/hibernate-util.c +++ b/src/shared/hibernate-util.c @@ -349,7 +349,7 @@ int find_suitable_hibernation_device_full(HibernationDevice *ret_device, uint64_ if (r < 0) return r; if (entries.n_swaps == 0) - return log_debug_errno(SYNTHETIC_ERRNO(ENOENT), "No swap space available for hibernation."); + return log_debug_errno(SYNTHETIC_ERRNO(ENOSPC), "No swap space available for hibernation."); FOREACH_ARRAY(swap, entries.swaps, entries.n_swaps) { r = swap_entry_get_resume_config(swap); @@ -385,7 +385,7 @@ int find_suitable_hibernation_device_full(HibernationDevice *ret_device, uint64_ if (!entry) { /* No need to check n_swaps == 0, since it's rejected early */ assert(resume_config_devno > 0); - return log_debug_errno(SYNTHETIC_ERRNO(ENXIO), "Cannot find swap entry corresponding to /sys/power/resume."); + return log_debug_errno(SYNTHETIC_ERRNO(ENOSPC), "Cannot find swap entry corresponding to /sys/power/resume."); } if (ret_device)