8b020b5eb7
This is a cleanup of the resulting code after detaching pmutils and Linux sys state file logic: - remove the SUSPEND_MODE_* macros and use an enumeration instead. At the same time, drop the switch statements at the start of each function and use the enumeration index to get the right binary/argument; - create a new function called run_process_child(). This function uses g_spawn_sync() to execute a shell command, returning the exit code. This is a common operation in the pmutils functions and will be used in the systemd implementation as well, so this function will avoid code repetition. There are more places inside commands-posix.c where this new run_process_child function can also be used, but one step at a time. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> *check/propagate local_err before setting errp directly 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 |