sleep-config: make sleep_operation_is_hibernation uppercase
This commit is contained in:
@@ -341,7 +341,7 @@ static int sleep_supported_internal(
|
||||
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;
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef enum SleepOperation {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -238,7 +238,7 @@ static int execute(
|
||||
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;
|
||||
|
||||
@@ -301,7 +301,7 @@ static int execute(
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
if (sleep_operation_is_hibernation(operation))
|
||||
if (SLEEP_OPERATION_IS_HIBERNATION(operation))
|
||||
clear_efi_hibernate_location_and_warn();
|
||||
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user