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

Re: [libvirt] [PATCH v2 2/3] libxl: streamline top-level migrate functions



On 02/07/2017 05:35 PM, Joao Martins wrote:
This allows us to reuse a single function for both tunnelled and
non-tunnelled variants.

Signed-off-by: Joao Martins <joao m martins oracle com>
---
New in v2
---
 src/libxl/libxl_driver.c | 36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 3a69720..7bc8adf 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -5930,21 +5930,22 @@ libxlDomainMigrateBegin3Params(virDomainPtr domain,
 }

 static int
-libxlDomainMigratePrepare3Params(virConnectPtr dconn,
-                                 virTypedParameterPtr params,
-                                 int nparams,
-                                 const char *cookiein,
-                                 int cookieinlen,
-                                 char **cookieout ATTRIBUTE_UNUSED,
-                                 int *cookieoutlen ATTRIBUTE_UNUSED,
-                                 char **uri_out,
-                                 unsigned int flags)
+libxlDomainMigratePrepareCommon(virConnectPtr dconn,
+                                virTypedParameterPtr params,
+                                int nparams,
+                                const char *cookiein,
+                                int cookieinlen,
+                                char **cookieout ATTRIBUTE_UNUSED,
+                                int *cookieoutlen ATTRIBUTE_UNUSED,
+                                unsigned int flags,
+                                void *data)
 {
     libxlDriverPrivatePtr driver = dconn->privateData;
     virDomainDefPtr def = NULL;
     const char *dom_xml = NULL;
     const char *dname = NULL;
     const char *uri_in = NULL;
+    char **uri_out = data;

 #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
     virReportUnsupportedError();
@@ -5985,6 +5986,23 @@ libxlDomainMigratePrepare3Params(virConnectPtr dconn,
 }

 static int
+libxlDomainMigratePrepare3Params(virConnectPtr dconn,
+                                 virTypedParameterPtr params,
+                                 int nparams,
+                                 const char *cookiein,
+                                 int cookieinlen,
+                                 char **cookieout ATTRIBUTE_UNUSED,
+                                 int *cookieoutlen ATTRIBUTE_UNUSED,
+                                 char **uri_out,
+                                 unsigned int flags)
+{
+    return libxlDomainMigratePrepareCommon(dconn, params, nparams,
+                                           cookiein, cookieinlen,
+                                           cookieout, cookieoutlen,
+                                           flags, uri_out);
+}

It appears the ACL check must be done in libxlDomainMigratePrepare3Params to satisfy 'make check'

./libxl/libxl_driver.c:5978 Mismatch check 'virDomainMigratePrepare3ParamsEnsureACL' for function 'libxlDomainMigratePrepareCommon'

Regards,
Jim

+
+static int
 libxlDomainMigratePerform3Params(virDomainPtr dom,
                                  const char *dconnuri,
                                  virTypedParameterPtr params,



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