return false;
}
- if (sleep_operation_is_hibernation(operation)) {
+ if (SLEEP_OPERATION_IS_HIBERNATION(operation)) {
r = sleep_mode_supported(sleep_config->modes[operation]);
if (r < 0)
return r;
const char* sleep_operation_to_string(SleepOperation s) _const_;
SleepOperation sleep_operation_from_string(const char *s) _pure_;
-static inline bool sleep_operation_is_hibernation(SleepOperation operation) {
+static inline bool SLEEP_OPERATION_IS_HIBERNATION(SleepOperation operation) {
return IN_SET(operation, SLEEP_HIBERNATE, SLEEP_HYBRID_SLEEP);
}
return log_error_errno(errno, "Failed to open /sys/power/state: %m");
/* Configure hibernation settings if we are supposed to hibernate */
- if (sleep_operation_is_hibernation(operation)) {
+ if (SLEEP_OPERATION_IS_HIBERNATION(operation)) {
_cleanup_(hibernation_device_done) HibernationDevice hibernation_device = {};
bool resume_set;
return 0;
fail:
- if (sleep_operation_is_hibernation(operation))
+ if (SLEEP_OPERATION_IS_HIBERNATION(operation))
clear_efi_hibernate_location_and_warn();
return r;