summaryrefslogtreecommitdiffstats
path: root/src/shared/sleep-config.h
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-09-28 00:43:06 +0200
committerMike Yuan <me@yhndnzj.com>2023-10-20 17:22:28 +0200
commit23577f44623c108e4958d435cf95cf93199503ba (patch)
tree5456a3fd633b13b220ab8ddbc4d0f8bf0984a107 /src/shared/sleep-config.h
parenttest-btrfs-physical-offset: log correct errno (diff)
downloadsystemd-23577f44623c108e4958d435cf95cf93199503ba.tar.xz
systemd-23577f44623c108e4958d435cf95cf93199503ba.zip
sleep-config: minor cleanup for can_sleep_{state,disk}
* Rename to sleep_{state,mode}_supported * Treat unreadable/unwriable sysfs files as error
Diffstat (limited to 'src/shared/sleep-config.h')
-rw-r--r--src/shared/sleep-config.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/sleep-config.h b/src/shared/sleep-config.h
index 467502a7da..fc737bf941 100644
--- a/src/shared/sleep-config.h
+++ b/src/shared/sleep-config.h
@@ -3,8 +3,6 @@
#include "time-util.h"
-#define DEFAULT_SUSPEND_ESTIMATION_USEC (1 * USEC_PER_HOUR)
-
typedef enum SleepOperation {
SLEEP_SUSPEND,
SLEEP_HIBERNATE,
@@ -38,5 +36,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(SleepConfig*, sleep_config_free);
int parse_sleep_config(SleepConfig **sleep_config);
int can_sleep(SleepOperation operation);
-int can_sleep_disk(char **types);
-int can_sleep_state(char **types);
+
+/* Only for test-sleep-config */
+int sleep_state_supported(char **states);
+int sleep_mode_supported(char **modes);