diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2018-06-21 07:21:49 -0300 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2018-07-03 15:20:51 -0500 |
commit | a5fcf0e3e491ede0d03e71f064e8e6d24e889aab (patch) | |
tree | 572a6336494cb8b9e0b27f7e1fae680fa2fa9e82 /qemu-nbd.texi | |
parent | 304a0fcb397efba40dffded985a6539143cca82c (diff) |
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>
Diffstat (limited to 'qemu-nbd.texi')
0 files changed, 0 insertions, 0 deletions