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 22 of 27 v3] libxl: remove libxl_device_console_add

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 22 of 27 v3] libxl: remove libxl_device_console_add
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 18 Oct 2011 13:55:17 +0100
Cc: ian.jackson@xxxxxxxxxx
Delivery-date: Tue, 18 Oct 2011 06:28:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1318942495@xxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <patchbomb.1318942495@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# 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

<Prev in Thread] Current Thread [Next in Thread>