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-devel

[Xen-devel] [PATCH 1 of 4] libxl: typedef libxl_action_on_shutdown

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 4] libxl: typedef libxl_action_on_shutdown
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 24 Mar 2011 14:09:13 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 24 Mar 2011 07:10:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1300975752@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1300969249 0
# Node ID 8a90d1a20afe38c1e0da84d5d120cb312d29d62b
# Parent  6ec431d280fc80a153b938c3620b37f047a452a8
libxl: typedef libxl_action_on_shutdown

This is the libxl convention.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 6ec431d280fc -r 8a90d1a20afe tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Thu Mar 24 12:20:48 2011 +0000
+++ b/tools/libxl/libxl.h       Thu Mar 24 12:20:49 2011 +0000
@@ -245,7 +245,7 @@ enum {
 
 #define LIBXL_VERSION 0
 
-enum libxl_action_on_shutdown {
+typedef enum {
     LIBXL_ACTION_DESTROY,
 
     LIBXL_ACTION_RESTART,
@@ -255,7 +255,7 @@ enum libxl_action_on_shutdown {
 
     LIBXL_ACTION_COREDUMP_DESTROY,
     LIBXL_ACTION_COREDUMP_RESTART,
-};
+} libxl_action_on_shutdown;
 
 typedef struct {
     libxl_domain_create_info c_info;
@@ -271,10 +271,10 @@ typedef struct {
     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 6ec431d280fc -r 8a90d1a20afe tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu Mar 24 12:20:48 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Thu Mar 24 12:20:49 2011 +0000
@@ -441,7 +441,7 @@ static void printf_info(int domid,
        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 @@ static int handle_domain_death(libxl_ctx
                                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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel