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

[Xen-devel] [PATCH 22 of 27 v3] libxl: remove libxl_device_console_add



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1318941403 -3600
# Node ID c8eab687999d2927a0a4581a6bf09deeadcbff13
# Parent  576b80340b0e92360792399d67aa26002b2771fc
libxl: remove libxl_device_console_add.

It has no callers, the only code which adds consoles in internal to libxl and
uses libxl__device_console_add directly.

Rather than worrying about what the public API should look like in this case
simply remove it, adding new APIs is much easier than fixing broken ones...

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

diff -r 576b80340b0e -r c8eab687999d tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue Oct 18 13:36:42 2011 +0100
+++ b/tools/libxl/libxl.c       Tue Oct 18 13:36:43 2011 +0100
@@ -1585,18 +1585,6 @@ out:
     return rc;
 }
 
-int libxl_device_console_add(libxl_ctx *ctx, uint32_t domid,
-                              libxl_device_console *console)
-{
-    libxl__gc gc = LIBXL_INIT_GC(ctx);
-    int rc = ERROR_INVAL;
-
-    rc = libxl__device_console_add(&gc, domid, console, NULL);
-
-    libxl__free_all(&gc);
-    return rc;
-}
-
 
/******************************************************************************/
 void libxl_device_vkb_init(libxl_device_vkb *vkb, int dev_num)
 {
diff -r 576b80340b0e -r c8eab687999d tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Tue Oct 18 13:36:42 2011 +0100
+++ b/tools/libxl/libxl.h       Tue Oct 18 13:36:43 2011 +0100
@@ -473,8 +473,6 @@ libxl_device_nic *libxl_device_nic_list(
 int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid,
                               libxl_device_nic *nic, libxl_nicinfo *nicinfo);
 
-int libxl_device_console_add(libxl_ctx *ctx, uint32_t domid, 
libxl_device_console *console);
-
 void libxl_device_vkb_init(libxl_device_vkb *vkb, int dev_num);
 int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb 
*vkb);
 int libxl_device_vkb_clean_shutdown(libxl_ctx *ctx, uint32_t domid);
diff -r 576b80340b0e -r c8eab687999d tools/ocaml/libs/xl/genwrap.py
--- a/tools/ocaml/libs/xl/genwrap.py    Tue Oct 18 13:36:42 2011 +0100
+++ b/tools/ocaml/libs/xl/genwrap.py    Tue Oct 18 13:36:43 2011 +0100
@@ -30,8 +30,6 @@ functions = { # ( name , [type1,type2,..
                         ("clean_shutdown", ["domid", "unit"]),
                         ("hard_shutdown",  ["domid", "unit"]),
                       ],
-    "device_console": [ ("add",            ["t", "domid", "unit"]),
-                      ],
     "device_disk":    DEVICE_FUNCTIONS,
     "device_nic":     DEVICE_FUNCTIONS,
     "device_pci":     [ ("add",            ["t", "domid", "unit"]),
diff -r 576b80340b0e -r c8eab687999d tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c      Tue Oct 18 13:36:42 2011 +0100
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c      Tue Oct 18 13:36:43 2011 +0100
@@ -288,23 +288,6 @@ value stub_xl_device_nic_del(value info,
        CAMLreturn(Val_unit);
 }
 
-value stub_xl_device_console_add(value info, value domid)
-{
-       CAMLparam2(info, domid);
-       libxl_device_console c_info;
-       int ret;
-       INIT_STRUCT();
-
-       device_console_val(&gc, &lg, &c_info, info);
-
-       INIT_CTX();
-       ret = libxl_device_console_add(ctx, Int_val(domid), &c_info);
-       if (ret != 0)
-               failwith_xl("console_add", &lg);
-       FREE_CTX();
-       CAMLreturn(Val_unit);
-}
-
 value stub_xl_device_vkb_add(value info, value domid)
 {
        CAMLparam2(info, domid);

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


 


Rackspace

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