mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
runstate_set(): Check for valid transitions
This commit could have been folded with the previous one, however doing it separately will allow for easy bisect and revert if needed. Checking and testing all valid transitions wasn't trivial, chances are this will need broader testing to become more stable. This is a transition table as suggested by Lluís Vilanova. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
f5bbfba1eb
commit
5db9d4d186
2 changed files with 74 additions and 1 deletions
1
sysemu.h
1
sysemu.h
|
@ -36,6 +36,7 @@ extern uint8_t qemu_uuid[];
|
|||
int qemu_uuid_parse(const char *str, uint8_t *uuid);
|
||||
#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
|
||||
|
||||
void runstate_init(void);
|
||||
bool runstate_check(RunState state);
|
||||
void runstate_set(RunState new_state);
|
||||
typedef struct vm_change_state_entry VMChangeStateEntry;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue