]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/sleep-fix: fix check if s-then-h is possible
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Apr 2018 09:39:14 +0000 (11:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Apr 2018 19:31:59 +0000 (21:31 +0200)
commitc863dc05881fd5afbc3c7ce700980354530cee8e
tree26147e7c99d0c2c02dab2f4565905ac21263c8d2
parent6524f1a8eb7c04b2eb4b2bc7b6bcda352e069d8c
shared/sleep-fix: fix check if s-then-h is possible

can_sleep() returns 0 if the operation is impossible, but
the code assumed that negative is returned in that case,
in effect reporting s2h was possible even if hibernation or
suspend were not possible.
src/shared/sleep-config.c