Home
last modified time | relevance | path

Searched refs:sleep_config (Results 1 – 4 of 4) sorted by relevance

/systemd-251/src/sleep/
Dsleep.c169 const SleepConfig *sleep_config, in execute() argument
191 assert(sleep_config); in execute()
196 states = sleep_config->states[operation]; in execute()
197 modes = sleep_config->modes[operation]; in execute()
265 static int execute_s2h(const SleepConfig *sleep_config) { in execute_s2h() argument
270 assert(sleep_config); in execute_s2h()
277 FORMAT_TIMESPAN(sleep_config->hibernate_delay_sec, USEC_PER_SEC)); in execute_s2h()
279 timespec_store(&ts.it_value, sleep_config->hibernate_delay_sec); in execute_s2h()
285 r = execute(sleep_config, SLEEP_SUSPEND, NULL); in execute_s2h()
299 FORMAT_TIMESPAN(sleep_config->hibernate_delay_sec, USEC_PER_SEC)); in execute_s2h()
[all …]
/systemd-251/src/test/
Dtest-sleep.c21 _cleanup_(free_sleep_configp) SleepConfig *sleep_config = NULL; in TEST()
23 assert_se(parse_sleep_config(&sleep_config) == 0); in TEST()
27 sum = strv_join(sleep_config->modes[SLEEP_SUSPEND], ", "); in TEST()
28 sus = strv_join(sleep_config->states[SLEEP_SUSPEND], ", "); in TEST()
29 him = strv_join(sleep_config->modes[SLEEP_HIBERNATE], ", "); in TEST()
30 his = strv_join(sleep_config->states[SLEEP_HIBERNATE], ", "); in TEST()
31 hym = strv_join(sleep_config->modes[SLEEP_HYBRID_SLEEP], ", "); in TEST()
32 hys = strv_join(sleep_config->states[SLEEP_HYBRID_SLEEP], ", "); in TEST()
33 log_debug(" allow_suspend: %u", sleep_config->allow[SLEEP_SUSPEND]); in TEST()
34 log_debug(" allow_hibernate: %u", sleep_config->allow[SLEEP_HIBERNATE]); in TEST()
[all …]
/systemd-251/src/shared/
Dsleep-config.c596 static int can_sleep_internal(const SleepConfig *sleep_config, SleepOperation operation, bool check…
598 static bool can_s2h(const SleepConfig *sleep_config) { in can_s2h() argument
613 r = can_sleep_internal(sleep_config, operations[i], false); in can_s2h()
626 const SleepConfig *sleep_config, in can_sleep_internal() argument
633 if (check_allowed && !sleep_config->allow[operation]) { in can_sleep_internal()
639 return can_s2h(sleep_config); in can_sleep_internal()
641 if (can_sleep_state(sleep_config->states[operation]) <= 0 || in can_sleep_internal()
642 can_sleep_disk(sleep_config->modes[operation]) <= 0) in can_sleep_internal()
655 _cleanup_(free_sleep_configp) SleepConfig *sleep_config = NULL; in can_sleep()
658 r = parse_sleep_config(&sleep_config); in can_sleep()
[all …]
Dsleep-config.h52 int parse_sleep_config(SleepConfig **sleep_config);