Home
last modified time | relevance | path

Searched hist:a5fcf0e3 (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/qga/
H A Dcommands-posix.ca5fcf0e3 Thu Jun 21 05:21:49 CDT 2018 Daniel Henrique Barboza <danielhb413@gmail.com> qga: bios_supports_mode: decoupling pm-utils and sys logic

In bios_supports_mode there is a verification to assert if
the chosen suspend mode is supported by the pmutils tools and,
if not, we see if the Linux sys state files supports it.

This verification is done in the same function, one after
the other, and it works for now. But, when adding a new
suspend mechanism that will not necessarily follow the same
return 0 or 1 logic of pmutils, this code will be hard
to deal with.

This patch decouple the two existing logics into their own
functions, pmutils_supports_mode and linux_sys_state_supports_mode,
which in turn are used inside bios_support_mode. The existing
logic is kept but now it's easier to extend it.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>