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 v2] libxl: remove libxl_device_console_add

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 22 of 27 v2] libxl: remove libxl_device_console_add
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 13 Oct 2011 10:53:47 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 13 Oct 2011 03:37:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1318499605@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>
References: <patchbomb.1318499605@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1318499566 -3600
# Node ID 17b83c16a9a6b3ca77be2d42f8d1275c9c28e570
# Parent  35a5d67ba9c81d489208786fe9f6ee803c67c82c
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 35a5d67ba9c8 -r 17b83c16a9a6 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Oct 13 10:52:46 2011 +0100
+++ b/tools/libxl/libxl.c       Thu Oct 13 10:52:46 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 35a5d67ba9c8 -r 17b83c16a9a6 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Thu Oct 13 10:52:46 2011 +0100
+++ b/tools/libxl/libxl.h       Thu Oct 13 10:52:46 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 35a5d67ba9c8 -r 17b83c16a9a6 tools/ocaml/libs/xl/genwrap.py
--- a/tools/ocaml/libs/xl/genwrap.py    Thu Oct 13 10:52:46 2011 +0100
+++ b/tools/ocaml/libs/xl/genwrap.py    Thu Oct 13 10:52:46 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 35a5d67ba9c8 -r 17b83c16a9a6 tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c      Thu Oct 13 10:52:46 2011 +0100
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c      Thu Oct 13 10:52:46 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>