c3a4ccc
From 47ac7a8558135553ebb190fbfef3438ce16c3581 Mon Sep 17 00:00:00 2001
c3a4ccc
From: Ian Jackson <ian.jackson@eu.citrix.com>
c3a4ccc
Date: Wed, 4 May 2016 16:18:36 +0100
c3a4ccc
Subject: [PATCH 11/21] libxl: Rename libxl__device_{nic,channel}_from_xs_be to
c3a4ccc
 _from_xenstore
c3a4ccc
c3a4ccc
We are going to change these functions to expect, and be passed, a
c3a4ccc
/libxl path.  So it is wrong that they are called _from_xs_be.
c3a4ccc
c3a4ccc
Neither function reads anything which isn't found in both places, so
c3a4ccc
we can and will change the call sites later.
c3a4ccc
c3a4ccc
The only remaining function in libxl called *_from_xs_be relates to
c3a4ccc
PCI devices, for which the backend domain is hardcoded to 0 throughout
c3a4ccc
the libxl_pci.c.
c3a4ccc
c3a4ccc
No functional change.
c3a4ccc
c3a4ccc
This is part of XSA-178.
c3a4ccc
c3a4ccc
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
c3a4ccc
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
c3a4ccc
---
c3a4ccc
 tools/libxl/libxl.c | 12 ++++++------
c3a4ccc
 1 file changed, 6 insertions(+), 6 deletions(-)
c3a4ccc
c3a4ccc
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
c3a4ccc
index 05f3ba1..e43713e 100644
c3a4ccc
--- a/tools/libxl/libxl.c
c3a4ccc
+++ b/tools/libxl/libxl.c
c3a4ccc
@@ -3585,7 +3585,7 @@ out:
c3a4ccc
     return;
c3a4ccc
 }
c3a4ccc
 
c3a4ccc
-static int libxl__device_nic_from_xs_be(libxl__gc *gc,
c3a4ccc
+static int libxl__device_nic_from_xenstore(libxl__gc *gc,
c3a4ccc
                                         const char *be_path,
c3a4ccc
                                         libxl_device_nic *nic)
c3a4ccc
 {
c3a4ccc
@@ -3649,7 +3649,7 @@ int libxl_devid_to_device_nic(libxl_ctx *ctx, uint32_t domid,
c3a4ccc
     if (!path)
c3a4ccc
         goto out;
c3a4ccc
 
c3a4ccc
-    rc = libxl__device_nic_from_xs_be(gc, path, nic);
c3a4ccc
+    rc = libxl__device_nic_from_xenstore(gc, path, nic);
c3a4ccc
     if (rc) goto out;
c3a4ccc
 
c3a4ccc
     rc = 0;
c3a4ccc
@@ -3684,7 +3684,7 @@ static int libxl__append_nic_list_of_type(libxl__gc *gc,
c3a4ccc
         for (; pnic < pnic_end; pnic++, dir++) {
c3a4ccc
             const char *p;
c3a4ccc
             p = libxl__sprintf(gc, "%s/%s", be_path, *dir);
c3a4ccc
-            rc = libxl__device_nic_from_xs_be(gc, p, pnic);
c3a4ccc
+            rc = libxl__device_nic_from_xenstore(gc, p, pnic);
c3a4ccc
             if (rc) goto out;
c3a4ccc
             pnic->backend_domid = 0;
c3a4ccc
         }
c3a4ccc
@@ -3934,7 +3934,7 @@ int libxl__init_console_from_channel(libxl__gc *gc,
c3a4ccc
     return 0;
c3a4ccc
 }
c3a4ccc
 
c3a4ccc
-static int libxl__device_channel_from_xs_be(libxl__gc *gc,
c3a4ccc
+static int libxl__device_channel_from_xenstore(libxl__gc *gc,
c3a4ccc
                                             const char *be_path,
c3a4ccc
                                             libxl_device_channel *channel)
c3a4ccc
 {
c3a4ccc
@@ -3943,7 +3943,7 @@ static int libxl__device_channel_from_xs_be(libxl__gc *gc,
c3a4ccc
 
c3a4ccc
     libxl_device_channel_init(channel);
c3a4ccc
 
c3a4ccc
-    /* READ_BACKEND is from libxl__device_nic_from_xs_be above */
c3a4ccc
+    /* READ_BACKEND is from libxl__device_nic_from_xenstore above */
c3a4ccc
     channel->name = READ_BACKEND(NOGC, "name");
c3a4ccc
     tmp = READ_BACKEND(gc, "connection");
c3a4ccc
     if (!strcmp(tmp, "pty")) {
c3a4ccc
@@ -3998,7 +3998,7 @@ static int libxl__append_channel_list(libxl__gc *gc,
c3a4ccc
         }
c3a4ccc
         *channels = tmp;
c3a4ccc
         next = *channels + *nchannels + devid;
c3a4ccc
-        rc = libxl__device_channel_from_xs_be(gc, be_path, next);
c3a4ccc
+        rc = libxl__device_channel_from_xenstore(gc, be_path, next);
c3a4ccc
         if (rc) goto out;
c3a4ccc
         next->devid = devid;
c3a4ccc
         devid++;
c3a4ccc
-- 
c3a4ccc
2.1.4
c3a4ccc