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

[Xen-changelog] [xen-unstable] libxl: Introduce libxl_internal_types.idl.



# HG changeset patch
# User Anthony PERARD <anthony.perard@xxxxxxxxxx>
# Date 1317310102 -3600
# Node ID f51dcd8acb7b950c870d23d250f56ad542997ae9
# Parent  f5ee5ad45425ec82b97cac7ff7fd4a34f424aa9d
libxl: Introduce libxl_internal_types.idl.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r f5ee5ad45425 -r f51dcd8acb7b tools/libxl/Makefile
--- a/tools/libxl/Makefile      Thu Sep 29 16:28:21 2011 +0100
+++ b/tools/libxl/Makefile      Thu Sep 29 16:28:22 2011 +0100
@@ -35,7 +35,7 @@
 LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \
                        libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \
                        libxl_internal.o libxl_utils.o libxl_uuid.o 
$(LIBXL_OBJS-y)
-LIBXL_OBJS += _libxl_types.o libxl_flask.o
+LIBXL_OBJS += _libxl_types.o libxl_flask.o _libxl_types_internal.o
 
 $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) 
$(CFLAGS_libxenstore) $(CFLAGS_libblktapctl)
 
@@ -81,8 +81,10 @@
 libxl_paths.c: _libxl_paths.h
 
 libxl.h: _libxl_types.h
+libxl_internal.h: _libxl_types_internal.h
 
 $(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS): libxl.h
+$(LIBXL_OBJS): libxl_internal.h
 
 _libxl_type%.h _libxl_type%.c: libxl_type%.idl gentypes.py libxltypes.py
        $(PYTHON) gentypes.py libxl_type$*.idl __libxl_type$*.h __libxl_type$*.c
diff -r f5ee5ad45425 -r f51dcd8acb7b tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py   Thu Sep 29 16:28:21 2011 +0100
+++ b/tools/libxl/gentypes.py   Thu Sep 29 16:28:22 2011 +0100
@@ -150,8 +150,9 @@
 
     f = open(header, "w")
 
-    f.write("""#ifndef __LIBXL_TYPES_H
-#define __LIBXL_TYPES_H
+    header_define = header.upper().replace('.','_')
+    f.write("""#ifndef %s
+#define %s
 
 /*
  * DO NOT EDIT.
@@ -160,7 +161,7 @@
  * "%s"
  */
 
-""" % " ".join(sys.argv))
+""" % (header_define, header_define, " ".join(sys.argv)))
 
     for ty in types:
         f.write(libxl_C_type_define(ty) + ";\n")
@@ -172,7 +173,7 @@
             f.write("extern libxl_enum_string_table %s_string_table[];\n" % 
(ty.typename))
         f.write("\n")
 
-    f.write("""#endif /* __LIBXL_TYPES_H */\n""")
+    f.write("""#endif /* %s */\n""" % (header_define))
     f.close()
 
     print "outputting libxl type implementations to %s" % impl
diff -r f5ee5ad45425 -r f51dcd8acb7b tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Thu Sep 29 16:28:21 2011 +0100
+++ b/tools/libxl/libxl_internal.h      Thu Sep 29 16:28:22 2011 +0100
@@ -35,6 +35,7 @@
 
 #include "flexarray.h"
 #include "libxl_utils.h"
+#include "_libxl_types_internal.h"
 
 #define LIBXL_DESTROY_TIMEOUT 10
 #define LIBXL_DEVICE_MODEL_START_TIMEOUT 10
diff -r f5ee5ad45425 -r f51dcd8acb7b tools/libxl/libxl_types_internal.idl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/libxl/libxl_types_internal.idl      Thu Sep 29 16:28:22 2011 +0100
@@ -0,0 +1,9 @@
+namespace("libxl__")
+
+libxl__qmp_message_type  = Enumeration("qmp_message_type", [
+    (1, "QMP"),
+    (2, "return"),
+    (3, "error"),
+    (4, "event"),
+    (5, "invalid"),
+    ])

_______________________________________________
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®.