[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: typedef libxl_action_on_shutdown



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1301596770 -3600
# Node ID 89c23f58aa986092da0c9a7dfac1c41befbe1f3f
# Parent  2f588e3f38df495c72058301505f5bd9c723aedf
libxl: typedef libxl_action_on_shutdown

This is the libxl convention. By using the "typedef enum foo { } foo;"
syntax we can retain backwards compatibility with existing users.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 2f588e3f38df -r 89c23f58aa98 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Thu Mar 31 19:35:27 2011 +0100
+++ b/tools/libxl/libxl.h       Thu Mar 31 19:39:30 2011 +0100
@@ -250,7 +250,7 @@
 
 #define LIBXL_VERSION 0
 
-enum libxl_action_on_shutdown {
+typedef enum libxl_action_on_shutdown {
     LIBXL_ACTION_DESTROY,
 
     LIBXL_ACTION_RESTART,
@@ -260,7 +260,7 @@
 
     LIBXL_ACTION_COREDUMP_DESTROY,
     LIBXL_ACTION_COREDUMP_RESTART,
-};
+} libxl_action_on_shutdown;
 
 typedef struct {
     libxl_domain_create_info c_info;
@@ -276,10 +276,10 @@
     libxl_device_vfb *vfbs;
     libxl_device_vkb *vkbs;
 
-    enum libxl_action_on_shutdown on_poweroff;
-    enum libxl_action_on_shutdown on_reboot;
-    enum libxl_action_on_shutdown on_watchdog;
-    enum libxl_action_on_shutdown on_crash;
+    libxl_action_on_shutdown on_poweroff;
+    libxl_action_on_shutdown on_reboot;
+    libxl_action_on_shutdown on_watchdog;
+    libxl_action_on_shutdown on_crash;
 } libxl_domain_config;
 
 /* context functions */
diff -r 2f588e3f38df -r 89c23f58aa98 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu Mar 31 19:35:27 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Thu Mar 31 19:39:30 2011 +0100
@@ -441,7 +441,7 @@
        printf(")\n");
 }
 
-static int parse_action_on_shutdown(const char *buf, enum 
libxl_action_on_shutdown *a)
+static int parse_action_on_shutdown(const char *buf, libxl_action_on_shutdown 
*a)
 {
     int i;
     const char *n;
@@ -1165,7 +1165,7 @@
                                libxl_domain_config *d_config, libxl_dominfo 
*info)
 {
     int restart = 0;
-    enum libxl_action_on_shutdown action;
+    libxl_action_on_shutdown action;
 
     switch (info->shutdown_reason) {
     case SHUTDOWN_poweroff:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.