]> git.proxmox.com Git - mirror_qemu.git/commit - qga/commands-posix.c
qga: Fix suspend on Linux guests without systemd
authorMark Somerville <mark@qpok.net>
Thu, 6 Apr 2023 12:45:31 +0000 (13:45 +0100)
committerKonstantin Kostiuk <kkostiuk@redhat.com>
Thu, 4 May 2023 09:30:01 +0000 (09:30 +0000)
commit86dcb6ab9b603450eb6d896cdc95286de2c7d561
tree7146b57ae92a95e208e19945c1a191a61307b0be
parent8cc28cb16e696580ffa29cd5fee0d371303c805b
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>
qga/commands-posix.c