WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: typedef libxl_action_on_shutdown
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 01 Apr 2011 06:50:18 +0100
Delivery-date: Thu, 31 Mar 2011 22:52:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: typedef libxl_action_on_shutdown, Xen patchbot-unstable <=