]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: fix XDR protocol compliance
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 19 Dec 2022 19:13:16 +0000 (14:13 -0500)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 17 Jan 2023 17:33:54 +0000 (12:33 -0500)
The RFC spec for XDR does not allow enums to omit their
values, they must be explicitly given. Don't rely on this
rpcgen language extension.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/lxc/lxc_monitor_protocol.x

index 5e3d5d99835ab45526f5004e4b9645646d6cdd4c..d6148412b738945a59b2ca5e736f7eb143e3b1d2 100644 (file)
@@ -7,9 +7,9 @@
 %#include "virxdrdefs.h"
 
 enum virLXCMonitorExitStatus {
-    VIR_LXC_MONITOR_EXIT_STATUS_ERROR,
-    VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN,
-    VIR_LXC_MONITOR_EXIT_STATUS_REBOOT
+    VIR_LXC_MONITOR_EXIT_STATUS_ERROR = 0,
+    VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN = 1,
+    VIR_LXC_MONITOR_EXIT_STATUS_REBOOT = 2
 };
 
 struct virLXCMonitorExitEventMsg {