mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
conf: Assert virDomainChrDeviceState and virConnectDomainEventAgentLifecycleState enums are in sync
When QEMU driver emits agent connected/disconnected events (inside of processSerialChangedEvent()) it declares a variable of virDomainChrDeviceState enum, and then passes this variable to virDomainEventAgentLifecycleNewFromObj(). But we document the agent lifecycle state to be of virConnectDomainEventAgentLifecycleState enum. Therefore, make sure values from virConnectDomainEventAgentLifecycleState enum are of the same value as those in virDomainChrDeviceState enum. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
1 parent
d9ed0a10d4
commit
b0c097dde0
1 file changed
+5
@@ -1243,6 +1243,11 @@ typedef enum {
|
||||
VIR_DOMAIN_CHR_DEVICE_STATE_LAST
|
||||
} virDomainChrDeviceState;
|
||||
|
||||
G_STATIC_ASSERT((int)VIR_DOMAIN_CHR_DEVICE_STATE_CONNECTED ==
|
||||
(int)VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED);
|
||||
G_STATIC_ASSERT((int)VIR_DOMAIN_CHR_DEVICE_STATE_DISCONNECTED ==
|
||||
(int)VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED);
|
||||
|
||||
VIR_ENUM_DECL(virDomainChrDeviceState);
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in new issue
Block a user