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

[Xen-changelog] [xen-unstable] libxl: libxl__device_model_version_running should return an int


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 26 Jul 2012 20:55:15 +0000
  • Delivery-date: Thu, 26 Jul 2012 20:55:22 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1343235442 -3600
# Node ID fb9a2cd50cab9b7ad4f2dd30d786bc9c574b9f5e
# Parent  a955d722c2e3366d7776be7f2ec0c436f5f9aee4
libxl: libxl__device_model_version_running should return an int

On error it returns -1 and therefore it needs to return int and not
libxl_device_model_enum. Otherwise gcc 4.6.2 complains:

    libxl.c: In function ?libxl_domain_suspend?:
    libxl.c:778:9: error: case value ?4294967295? not in enumerated type 
?libxl_device_model_version? [-Werror=switch]

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


diff -r a955d722c2e3 -r fb9a2cd50cab tools/libxl/libxl_internal.c
--- a/tools/libxl/libxl_internal.c      Wed Jul 25 17:56:39 2012 +0100
+++ b/tools/libxl/libxl_internal.c      Wed Jul 25 17:57:22 2012 +0100
@@ -330,8 +330,7 @@ out:
     return rc;
 }
 
-libxl_device_model_version libxl__device_model_version_running(libxl__gc *gc,
-                                                               uint32_t domid)
+int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid)
 {
     char *path = NULL;
     char *dm_version = NULL;
diff -r a955d722c2e3 -r fb9a2cd50cab tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Wed Jul 25 17:56:39 2012 +0100
+++ b/tools/libxl/libxl_internal.h      Wed Jul 25 17:57:22 2012 +0100
@@ -1515,8 +1515,7 @@ _hidden libxl__json_object *libxl__json_
 
   /* Based on /local/domain/$domid/dm-version xenstore key
    * default is qemu xen traditional */
-_hidden libxl_device_model_version
-libxl__device_model_version_running(libxl__gc *gc, uint32_t domid);
+_hidden int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid);
 
 
 /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.