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

Re: [libvirt] [PATCH v2 4/5] Parallels: Add domainCreateWithFlags() function.

This check supresses unused variable warning. I thought that it would be rather natural that just ATTRIBUTE_UNUSED. This flags will be used in new version of our driver based on our published SDK (https://github.com/Parallels/parallels-sdk). You are perfectly right, this code is a quite similiar to parallelsDomainState. I can rewrite it to make a little bit clearer or you may reject this patch and wait for a SDK-version. Current version of that function doesn't mean a lot for us.
Thank you!

On 08/22/2014 04:51 PM, Ján Tomko wrote:
On 08/22/2014 01:04 PM, Alexander Burluka wrote:
domainCreateWithFlags function is used by OpenStack Nova to boot
  src/parallels/parallels_driver.c | 50 ++++++++++++++++++++++++++++++++++++++++
  1 file changed, 50 insertions(+)

diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 0373830..d0f49b9 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -2428,6 +2428,55 @@ parallelsNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED,
+static int
+parallelsDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
+    parallelsConnPtr privconn = domain->conn->privateData;
+    virDomainObjPtr privdom = NULL;
+    int ret = -1;
+    virCheckFlags(VIR_DOMAIN_START_PAUSED |
+                  VIR_DOMAIN_START_BYPASS_CACHE |
+                  VIR_DOMAIN_START_FORCE_BOOT, -1);
You don't seem to be using the flags anywhere. I don't think we should pretend
they are supported if they have no effect.

Also, shouldn't this share more code with parallelsDomainCreate?


Alexander Burluka

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