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

[Xen-changelog] [xen master] libxl: Rename libxl__device_{nic, channel}_from_xs_be to _from_xenstore



commit 94a3e2798e4b739d9d22874c07ce8011788f77f7
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed May 4 16:18:36 2016 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu Jun 2 15:53:29 2016 +0100

    libxl: Rename libxl__device_{nic,channel}_from_xs_be to _from_xenstore
    
    We are going to change these functions to expect, and be passed, a
    /libxl path.  So it is wrong that they are called _from_xs_be.
    
    Neither function reads anything which isn't found in both places, so
    we can and will change the call sites later.
    
    The only remaining function in libxl called *_from_xs_be relates to
    PCI devices, for which the backend domain is hardcoded to 0 throughout
    the libxl_pci.c.
    
    No functional change.
    
    This is part of XSA-178.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 4193c9c..58eb914 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3586,7 +3586,7 @@ out:
     return;
 }
 
-static int libxl__device_nic_from_xs_be(libxl__gc *gc,
+static int libxl__device_nic_from_xenstore(libxl__gc *gc,
                                         const char *be_path,
                                         libxl_device_nic *nic)
 {
@@ -3650,7 +3650,7 @@ int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t 
domid,
     if (!path)
         goto out;
 
-    rc = libxl__device_nic_from_xs_be(gc, path, nic);
+    rc = libxl__device_nic_from_xenstore(gc, path, nic);
     if (rc) goto out;
 
     rc = 0;
@@ -3685,7 +3685,7 @@ static int libxl__append_nic_list_of_type(libxl__gc *gc,
         for (; pnic < pnic_end; pnic++, dir++) {
             const char *p;
             p = GCSPRINTF("%s/%s", be_path, *dir);
-            rc = libxl__device_nic_from_xs_be(gc, p, pnic);
+            rc = libxl__device_nic_from_xenstore(gc, p, pnic);
             if (rc) goto out;
             pnic->backend_domid = 0;
         }
@@ -3935,7 +3935,7 @@ int libxl__init_console_from_channel(libxl__gc *gc,
     return 0;
 }
 
-static int libxl__device_channel_from_xs_be(libxl__gc *gc,
+static int libxl__device_channel_from_xenstore(libxl__gc *gc,
                                             const char *be_path,
                                             libxl_device_channel *channel)
 {
@@ -3944,7 +3944,7 @@ static int libxl__device_channel_from_xs_be(libxl__gc *gc,
 
     libxl_device_channel_init(channel);
 
-    /* READ_BACKEND is from libxl__device_nic_from_xs_be above */
+    /* READ_BACKEND is from libxl__device_nic_from_xenstore above */
     channel->name = READ_BACKEND(NOGC, "name");
     tmp = READ_BACKEND(gc, "connection");
     if (!strcmp(tmp, "pty")) {
@@ -3999,7 +3999,7 @@ static int libxl__append_channel_list(libxl__gc *gc,
         }
         *channels = tmp;
         next = *channels + *nchannels + devid;
-        rc = libxl__device_channel_from_xs_be(gc, be_path, next);
+        rc = libxl__device_channel_from_xenstore(gc, be_path, next);
         if (rc) goto out;
         next->devid = devid;
         devid++;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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