]> git.ipfire.org Git - thirdparty/qemu.git/commit
qga: Fix suspend on Linux guests without systemd
authorMark Somerville <mark@qpok.net>
Thu, 6 Apr 2023 12:45:31 +0000 (13:45 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 8 Jun 2023 10:30:56 +0000 (13:30 +0300)
commit07e7102b8eb822d9c035c329382d8a3d9cf9bfd6
tree7254af2fb327e18e3a3510a24da1540be6252baa
parent8e84a20705cae1fc1cd268de06e46eaa17bf6b06
qga: Fix suspend on Linux guests without systemd

Allow the Linux guest agent to attempt each of the suspend methods
(systemctl, pm-* and writing to /sys) in turn.

Prior to this guests without systemd failed to suspend due to
`guest_suspend` returning early regardless of the return value of
`systemd_supports_mode`.

Signed-off-by: Mark Somerville <mark@qpok.net>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
(cherry picked from commit 86dcb6ab9b603450eb6d896cdc95286de2c7d561)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qga/commands-posix.c