a5fcf0e3e4
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> |
||
---|---|---|
.. | ||
installer | ||
vss-win32 | ||
channel-posix.c | ||
channel-win32.c | ||
channel.h | ||
commands-posix.c | ||
commands-win32.c | ||
commands.c | ||
guest-agent-command-state.c | ||
guest-agent-core.h | ||
main.c | ||
Makefile.objs | ||
qapi-schema.json | ||
service-win32.c | ||
service-win32.h | ||
vss-win32.c | ||
vss-win32.h |