Re: [PATCH 3/4] libxl: advertise the support for VIR_TYPED_PARAM_STRING

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

 



On 06/28/2013 08:32 AM, Dario Faggioli wrote:
domainGetNumaParameters has a string typed parameter, hence it
is necessary for the libxl driver to support this.

This change implements the connectSupportsFeature hook for the
libxl driver, advertising that VIR_DRV_FEATURE_TYPED_PARAM_STRING
is something good to go.

s/something good to go/supported/


Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
Cc: Eric Blake <eblake@xxxxxxxxxx>
---
  src/libxl/libxl_driver.c |   15 +++++++++++++++
  1 file changed, 15 insertions(+)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index a3a9171..53af609 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -4660,6 +4660,20 @@ libxlConnectListAllDomains(virConnectPtr conn,
      return ret;
  }
+/* Which features are supported by this driver? */
+static int
+libxlConnectSupportsFeature(virConnectPtr conn, int feature)
+{
+    if (virConnectSupportsFeatureEnsureACL(conn) < 0)
+        return -1;
+
+    switch (feature) {
+    case VIR_DRV_FEATURE_TYPED_PARAM_STRING:
+        return 1;
+    default:
+        return 0;
+    }
+}
static virDriver libxlDriver = {
@@ -4740,6 +4754,7 @@ static virDriver libxlDriver = {
      .connectDomainEventRegisterAny = libxlConnectDomainEventRegisterAny, /* 0.9.0 */
      .connectDomainEventDeregisterAny = libxlConnectDomainEventDeregisterAny, /* 0.9.0 */
      .connectIsAlive = libxlConnectIsAlive, /* 0.9.8 */
+    .connectSupportsFeature = libxlConnectSupportsFeature, /* 1.1.1 */
  };
static virStateDriver libxlStateDriver = {

As was mentioned in the reply to 0/4, libxlDomainGetSchedulerParametersFlags() will have to accommodate this change.

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]