[libvirt] [PATCH] cleanup virDomainCreateLinux into virDomainDefineXML

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

 



  As promised in the libvirt-qpid thread, virDomainCreateLinux() call
name makes no sense (anymore), and it should be renamed, i guess since
virDomainCreate() already exist and by similarity with
virDomainDefineXML() the best name is virDomainCreateXML().

  The associated patch rename virDomainCreateLinux to virDomainCreateXML
create a small function virDomainCreateLinux calling the former,
document it as deprecated. To help comprehension of the source code
it's also best to rename the internal driver method in a similar
way, which inflates the patch a bit but is IMHO worth it.

  The patch also fixes a few #elif define(__sun__) and turn them
into the correct #elif defined(__sun__) cpp instructions, and changes
include/libvirt/virterror.h to improve the generated HTML page about the
deprected fileds in the structure, since we need to regenerate the
API xml and the docs, it was a good opportunity for that small change.

  I removed the docs/ subdir part from the patch as it's generated
and mostly unreadable, that keeps it smaller too.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
Index: include/libvirt/libvirt.h
===================================================================
RCS file: /data/cvs/libxen/include/libvirt/libvirt.h,v
retrieving revision 1.83
diff -u -p -r1.83 libvirt.h
--- include/libvirt/libvirt.h	23 Sep 2008 20:48:49 -0000	1.83
+++ include/libvirt/libvirt.h	9 Oct 2008 14:47:53 -0000
@@ -437,7 +437,7 @@ virConnectPtr           virDomainGetConn
 /*
  * Domain creation and destruction
  */
-virDomainPtr            virDomainCreateLinux    (virConnectPtr conn,
+virDomainPtr            virDomainCreateXML      (virConnectPtr conn,
                                                  const char *xmlDesc,
                                                  unsigned int flags);
 virDomainPtr            virDomainLookupByName   (virConnectPtr conn,
@@ -987,6 +987,12 @@ char *                  virStorageVolGet
 
 char *                  virStorageVolGetPath            (virStorageVolPtr vol);
 
+/*
+ * Deprecated calls
+ */
+virDomainPtr            virDomainCreateLinux    (virConnectPtr conn,
+                                                 const char *xmlDesc,
+                                                 unsigned int flags);
 #ifdef __cplusplus
 }
 #endif
Index: include/libvirt/libvirt.h.in
===================================================================
RCS file: /data/cvs/libxen/include/libvirt/libvirt.h.in,v
retrieving revision 1.54
diff -u -p -r1.54 libvirt.h.in
--- include/libvirt/libvirt.h.in	17 Sep 2008 14:15:21 -0000	1.54
+++ include/libvirt/libvirt.h.in	9 Oct 2008 14:47:53 -0000
@@ -437,7 +437,7 @@ virConnectPtr           virDomainGetConn
 /*
  * Domain creation and destruction
  */
-virDomainPtr            virDomainCreateLinux    (virConnectPtr conn,
+virDomainPtr            virDomainCreateXML      (virConnectPtr conn,
                                                  const char *xmlDesc,
                                                  unsigned int flags);
 virDomainPtr            virDomainLookupByName   (virConnectPtr conn,
@@ -987,6 +987,12 @@ char *                  virStorageVolGet
 
 char *                  virStorageVolGetPath            (virStorageVolPtr vol);
 
+/*
+ * Deprecated calls
+ */
+virDomainPtr            virDomainCreateLinux    (virConnectPtr conn,
+                                                 const char *xmlDesc,
+                                                 unsigned int flags);
 #ifdef __cplusplus
 }
 #endif
Index: include/libvirt/virterror.h
===================================================================
RCS file: /data/cvs/libxen/include/libvirt/virterror.h,v
retrieving revision 1.40
diff -u -p -r1.40 virterror.h
--- include/libvirt/virterror.h	11 Jul 2008 16:23:36 -0000	1.40
+++ include/libvirt/virterror.h	9 Oct 2008 14:47:53 -0000
@@ -78,15 +78,17 @@ struct _virError {
     int		domain;	/* What part of the library raised this error */
     char       *message;/* human-readable informative error message */
     virErrorLevel level;/* how consequent is the error */
-    virConnectPtr conn VIR_DEPRECATED; /* connection if available,
+    virConnectPtr conn VIR_DEPRECATED; /* connection if available, deprecated
                                           see note above */
-    virDomainPtr dom VIR_DEPRECATED; /* domain if available, see note above */
+    virDomainPtr dom VIR_DEPRECATED; /* domain if available, deprecated
+                                        see note above */
     char       *str1;	/* extra string information */
     char       *str2;	/* extra string information */
     char       *str3;	/* extra string information */
     int		int1;	/* extra number information */
     int		int2;	/* extra number information */
-    virNetworkPtr net VIR_DEPRECATED; /* network if available, see note above */
+    virNetworkPtr net VIR_DEPRECATED; /* network if available, deprecated
+                                         see note above */
 };
 
 /**
Index: src/driver.h
===================================================================
RCS file: /data/cvs/libxen/src/driver.h,v
retrieving revision 1.53
diff -u -p -r1.53 driver.h
--- src/driver.h	27 Aug 2008 20:05:59 -0000	1.53
+++ src/driver.h	9 Oct 2008 14:47:54 -0000
@@ -103,7 +103,7 @@ typedef int
 typedef int
         (*virDrvNumOfDomains)		(virConnectPtr conn);
 typedef virDomainPtr
-        (*virDrvDomainCreateLinux)	(virConnectPtr conn,
+        (*virDrvDomainCreateXML)	(virConnectPtr conn,
                                          const char *xmlDesc,
                                          unsigned int flags);
 typedef virDomainPtr
@@ -309,7 +309,7 @@ struct _virDriver {
     virDrvGetCapabilities		getCapabilities;
     virDrvListDomains		listDomains;
     virDrvNumOfDomains		numOfDomains;
-    virDrvDomainCreateLinux		domainCreateLinux;
+    virDrvDomainCreateXML		domainCreateXML;
     virDrvDomainLookupByID		domainLookupByID;
     virDrvDomainLookupByUUID	domainLookupByUUID;
     virDrvDomainLookupByName	domainLookupByName;
Index: src/libvirt.c
===================================================================
RCS file: /data/cvs/libxen/src/libvirt.c,v
retrieving revision 1.157
diff -u -p -r1.157 libvirt.c
--- src/libvirt.c	6 Oct 2008 19:53:06 -0000	1.157
+++ src/libvirt.c	9 Oct 2008 14:47:54 -0000
@@ -1225,12 +1225,12 @@ virDomainGetConnect (virDomainPtr dom)
 }
 
 /**
- * virDomainCreateLinux:
+ * virDomainCreateXML:
  * @conn: pointer to the hypervisor connection
  * @xmlDesc: string containing an XML description of the domain
  * @flags: callers should always pass 0
  *
- * Launch a new Linux guest domain, based on an XML description similar
+ * Launch a new guest domain, based on an XML description similar
  * to the one returned by virDomainGetXMLDesc()
  * This function may requires privileged access to the hypervisor.
  * The domain is not persistent, so its definition will disappear when it
@@ -1240,8 +1240,8 @@ virDomainGetConnect (virDomainPtr dom)
  * Returns a new domain object or NULL in case of failure
  */
 virDomainPtr
-virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
-                     unsigned int flags)
+virDomainCreateXML(virConnectPtr conn, const char *xmlDesc,
+                   unsigned int flags)
 {
     DEBUG("conn=%p, xmlDesc=%s, flags=%d", conn, xmlDesc, flags);
 
@@ -1258,13 +1258,29 @@ virDomainCreateLinux(virConnectPtr conn,
         return (NULL);
     }
 
-    if (conn->driver->domainCreateLinux)
-        return conn->driver->domainCreateLinux (conn, xmlDesc, flags);
+    if (conn->driver->domainCreateXML)
+        return conn->driver->domainCreateXML (conn, xmlDesc, flags);
 
     virLibConnError (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
     return NULL;
 }
 
+/**
+ * virDomainCreateLinux:
+ * @conn: pointer to the hypervisor connection
+ * @xmlDesc: string containing an XML description of the domain
+ * @flags: callers should always pass 0
+ *
+ * Deprecated after 0.4.6 use virDomainCreateXML()
+ *
+ * Returns a new domain object or NULL in case of failure
+ */
+virDomainPtr
+virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
+                     unsigned int flags)
+{
+    return(virDomainCreateXML(conn, xmlDesc, flags));
+}
 
 /**
  * virDomainLookupByID:
@@ -2078,7 +2094,7 @@ virDomainGetInfo(virDomainPtr domain, vi
  * @flags: an OR'ed set of virDomainXMLFlags
  *
  * Provide an XML description of the domain. The description may be reused
- * later to relaunch the domain with virDomainCreateLinux().
+ * later to relaunch the domain with virDomainCreateXML().
  *
  * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of error.
  *         the caller must free() the returned value.
Index: src/libvirt_sym.version
===================================================================
RCS file: /data/cvs/libxen/src/libvirt_sym.version,v
retrieving revision 1.44
diff -u -p -r1.44 libvirt_sym.version
--- src/libvirt_sym.version	27 Aug 2008 20:05:59 -0000	1.44
+++ src/libvirt_sym.version	9 Oct 2008 14:47:54 -0000
@@ -16,6 +16,7 @@
 	virConnectNumOfDomains;
         virDomainCreate;
 	virDomainCreateLinux;
+	virDomainCreateXML;
         virDomainDefineXML;
 	virDomainDestroy;
 	virDomainFree;
Index: src/lxc_driver.c
===================================================================
RCS file: /data/cvs/libxen/src/lxc_driver.c,v
retrieving revision 1.31
diff -u -p -r1.31 lxc_driver.c
--- src/lxc_driver.c	8 Oct 2008 16:28:49 -0000	1.31
+++ src/lxc_driver.c	9 Oct 2008 14:47:54 -0000
@@ -1145,7 +1145,8 @@ static int lxcVersion(virConnectPtr conn
     return 0;
 }
 
-static char *lxcGetSchedulerType(virDomainPtr domain, int *nparams)
+static char *lxcGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
+                                 int *nparams)
 {
     if (nparams)
         *nparams = 1;
@@ -1251,7 +1252,7 @@ static virDriver lxcDriver = {
     NULL, /* getCapabilities */
     lxcListDomains, /* listDomains */
     lxcNumDomains, /* numOfDomains */
-    lxcDomainCreateAndStart, /* domainCreateLinux */
+    lxcDomainCreateAndStart, /* domainCreateXML */
     lxcDomainLookupByID, /* domainLookupByID */
     lxcDomainLookupByUUID, /* domainLookupByUUID */
     lxcDomainLookupByName, /* domainLookupByName */
Index: src/openvz_driver.c
===================================================================
RCS file: /data/cvs/libxen/src/openvz_driver.c,v
retrieving revision 1.48
diff -u -p -r1.48 openvz_driver.c
--- src/openvz_driver.c	17 Sep 2008 16:07:03 -0000	1.48
+++ src/openvz_driver.c	9 Oct 2008 14:47:54 -0000
@@ -491,7 +491,7 @@ openvzDomainDefineXML(virConnectPtr conn
 }
 
 static virDomainPtr
-openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
+openvzDomainCreateXML(virConnectPtr conn, const char *xml,
                         unsigned int flags ATTRIBUTE_UNUSED)
 {
     virDomainDefPtr vmdef = NULL;
@@ -971,7 +971,7 @@ static virDriver openvzDriver = {
     openvzGetCapabilities, /* getCapabilities */
     openvzListDomains, /* listDomains */
     openvzNumDomains, /* numOfDomains */
-    openvzDomainCreateLinux, /* domainCreateLinux */
+    openvzDomainCreateXML, /* domainCreateXML */
     openvzDomainLookupByID, /* domainLookupByID */
     openvzDomainLookupByUUID, /* domainLookupByUUID */
     openvzDomainLookupByName, /* domainLookupByName */
Index: src/proxy_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/proxy_internal.c,v
retrieving revision 1.52
diff -u -p -r1.52 proxy_internal.c
--- src/proxy_internal.c	29 Aug 2008 07:11:15 -0000	1.52
+++ src/proxy_internal.c	9 Oct 2008 14:47:54 -0000
@@ -53,7 +53,7 @@ struct xenUnifiedDriver xenProxyDriver =
     xenProxyGetCapabilities, /* getCapabilities */
     xenProxyListDomains, /* listDomains */
     xenProxyNumOfDomains, /* numOfDomains */
-    NULL, /* domainCreateLinux */
+    NULL, /* domainCreateXML */
     NULL, /* domainSuspend */
     NULL, /* domainResume */
     NULL, /* domainShutdown */
Index: src/qemu_driver.c
===================================================================
RCS file: /data/cvs/libxen/src/qemu_driver.c,v
retrieving revision 1.129
diff -u -p -r1.129 qemu_driver.c
--- src/qemu_driver.c	8 Oct 2008 13:44:40 -0000	1.129
+++ src/qemu_driver.c	9 Oct 2008 14:47:54 -0000
@@ -4025,7 +4025,7 @@ static virDriver qemuDriver = {
     qemudGetCapabilities, /* getCapabilities */
     qemudListDomains, /* listDomains */
     qemudNumDomains, /* numOfDomains */
-    qemudDomainCreate, /* domainCreateLinux */
+    qemudDomainCreate, /* domainCreateXML */
     qemudDomainLookupByID, /* domainLookupByID */
     qemudDomainLookupByUUID, /* domainLookupByUUID */
     qemudDomainLookupByName, /* domainLookupByName */
Index: src/remote_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/remote_internal.c,v
retrieving revision 1.86
diff -u -p -r1.86 remote_internal.c
--- src/remote_internal.c	6 Oct 2008 19:53:06 -0000	1.86
+++ src/remote_internal.c	9 Oct 2008 14:47:55 -0000
@@ -1391,13 +1391,13 @@ remoteNumOfDomains (virConnectPtr conn)
 }
 
 static virDomainPtr
-remoteDomainCreateLinux (virConnectPtr conn,
+remoteDomainCreateXML (virConnectPtr conn,
                          const char *xmlDesc,
                          unsigned int flags)
 {
     virDomainPtr dom;
-    remote_domain_create_linux_args args;
-    remote_domain_create_linux_ret ret;
+    remote_domain_create_xml_args args;
+    remote_domain_create_xml_ret ret;
     GET_PRIVATE (conn, NULL);
 
     args.xml_desc = (char *) xmlDesc;
@@ -1405,12 +1405,12 @@ remoteDomainCreateLinux (virConnectPtr c
 
     memset (&ret, 0, sizeof ret);
     if (call (conn, priv, 0, REMOTE_PROC_DOMAIN_CREATE_LINUX,
-              (xdrproc_t) xdr_remote_domain_create_linux_args, (char *) &args,
-              (xdrproc_t) xdr_remote_domain_create_linux_ret, (char *) &ret) == -1)
+              (xdrproc_t) xdr_remote_domain_create_xml_args, (char *) &args,
+              (xdrproc_t) xdr_remote_domain_create_xml_ret, (char *) &ret) == -1)
         return NULL;
 
     dom = get_nonnull_domain (conn, ret.dom);
-    xdr_free ((xdrproc_t) &xdr_remote_domain_create_linux_ret, (char *) &ret);
+    xdr_free ((xdrproc_t) &xdr_remote_domain_create_xml_ret, (char *) &ret);
 
     return dom;
 }
@@ -4829,7 +4829,7 @@ static virDriver driver = {
     .getCapabilities = remoteGetCapabilities,
     .listDomains = remoteListDomains,
     .numOfDomains = remoteNumOfDomains,
-    .domainCreateLinux = remoteDomainCreateLinux,
+    .domainCreateXML = remoteDomainCreateXML,
     .domainLookupByID = remoteDomainLookupByID,
     .domainLookupByUUID = remoteDomainLookupByUUID,
     .domainLookupByName = remoteDomainLookupByName,
Index: src/test.c
===================================================================
RCS file: /data/cvs/libxen/src/test.c,v
retrieving revision 1.84
diff -u -p -r1.84 test.c
--- src/test.c	20 Aug 2008 20:48:36 -0000	1.84
+++ src/test.c	9 Oct 2008 14:47:55 -0000
@@ -666,7 +666,7 @@ static int testNumOfDomains(virConnectPt
 }
 
 static virDomainPtr
-testDomainCreateLinux(virConnectPtr conn, const char *xml,
+testDomainCreateXML(virConnectPtr conn, const char *xml,
                       unsigned int flags ATTRIBUTE_UNUSED)
 {
     virDomainPtr ret;
@@ -1552,7 +1552,7 @@ static virDriver testDriver = {
     testGetCapabilities, /* getCapabilities */
     testListDomains, /* listDomains */
     testNumOfDomains, /* numOfDomains */
-    testDomainCreateLinux, /* domainCreateLinux */
+    testDomainCreateXML, /* domainCreateXML */
     testLookupDomainByID, /* domainLookupByID */
     testLookupDomainByUUID, /* domainLookupByUUID */
     testLookupDomainByName, /* domainLookupByName */
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libxen/src/virsh.c,v
retrieving revision 1.167
diff -u -p -r1.167 virsh.c
--- src/virsh.c	8 Oct 2008 16:28:49 -0000	1.167
+++ src/virsh.c	9 Oct 2008 14:47:55 -0000
@@ -894,7 +894,7 @@ cmdCreate(vshControl *ctl, const vshCmd 
     if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
         return FALSE;
 
-    dom = virDomainCreateLinux(ctl->conn, buffer, 0);
+    dom = virDomainCreateXML(ctl->conn, buffer, 0);
     free (buffer);
 
     if (dom != NULL) {
Index: src/xen_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/xen_internal.c,v
retrieving revision 1.126
diff -u -p -r1.126 xen_internal.c
--- src/xen_internal.c	6 Oct 2008 19:53:06 -0000	1.126
+++ src/xen_internal.c	9 Oct 2008 14:47:55 -0000
@@ -70,7 +70,7 @@ typedef struct v1_hypercall_struct
 #define XEN_V1_IOCTL_HYPERCALL_CMD                  \
     _IOC(_IOC_NONE, 'P', 0, sizeof(v1_hypercall_t))
 typedef v1_hypercall_t hypercall_t;
-#elif define(__sun__)
+#elif defined(__sun__)
 typedef privcmd_hypercall_t hypercall_t;
 #else
 #error "unsupported platform"
@@ -335,7 +335,7 @@ lock_pages(void *addr, size_t len)
 {
 #ifdef __linux__
         return (mlock(addr, len));
-#elif define(__sun)
+#elif defined(__sun)
         return (0);
 #endif
 }
@@ -345,7 +345,7 @@ unlock_pages(void *addr, size_t len)
 {
 #ifdef __linux__
         return (munlock(addr, len));
-#elif define(__sun)
+#elif defined(__sun)
         return (0);
 #endif
 }
@@ -661,7 +661,7 @@ typedef struct xen_op_v2_dom xen_op_v2_d
 #define XEN_HYPERVISOR_SOCKET	"/proc/xen/privcmd"
 #define HYPERVISOR_CAPABILITIES	"/sys/hypervisor/properties/capabilities"
 #define CPUINFO			"/proc/cpuinfo"
-#elif define(__sun__)
+#elif defined(__sun__)
 #define XEN_HYPERVISOR_SOCKET	"/dev/xen/privcmd"
 #define HYPERVISOR_CAPABILITIES	""
 #define CPUINFO			"/dev/cpu/self/cpuid"
@@ -684,7 +684,7 @@ struct xenUnifiedDriver xenHypervisorDri
     xenHypervisorGetCapabilities, /* getCapabilities */
     xenHypervisorListDomains, /* listDomains */
     xenHypervisorNumOfDomains, /* numOfDomains */
-    NULL, /* domainCreateLinux */
+    NULL, /* domainCreateXML */
     xenHypervisorPauseDomain, /* domainSuspend */
     xenHypervisorResumeDomain, /* domainResume */
     NULL, /* domainShutdown */
Index: src/xen_unified.c
===================================================================
RCS file: /data/cvs/libxen/src/xen_unified.c,v
retrieving revision 1.55
diff -u -p -r1.55 xen_unified.c
--- src/xen_unified.c	6 Oct 2008 19:53:06 -0000	1.55
+++ src/xen_unified.c	9 Oct 2008 14:47:55 -0000
@@ -509,16 +509,16 @@ xenUnifiedNumOfDomains (virConnectPtr co
 }
 
 static virDomainPtr
-xenUnifiedDomainCreateLinux (virConnectPtr conn,
-                             const char *xmlDesc, unsigned int flags)
+xenUnifiedDomainCreateXML (virConnectPtr conn,
+                           const char *xmlDesc, unsigned int flags)
 {
     GET_PRIVATE(conn);
     int i;
     virDomainPtr ret;
 
     for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
-        if (priv->opened[i] && drivers[i]->domainCreateLinux) {
-            ret = drivers[i]->domainCreateLinux (conn, xmlDesc, flags);
+        if (priv->opened[i] && drivers[i]->domainCreateXML) {
+            ret = drivers[i]->domainCreateXML (conn, xmlDesc, flags);
             if (ret) return ret;
         }
 
@@ -1317,7 +1317,7 @@ static virDriver xenUnifiedDriver = {
     .getCapabilities 		= xenUnifiedGetCapabilities,
     .listDomains 			= xenUnifiedListDomains,
     .numOfDomains 		= xenUnifiedNumOfDomains,
-    .domainCreateLinux 		= xenUnifiedDomainCreateLinux,
+    .domainCreateXML 		= xenUnifiedDomainCreateXML,
     .domainLookupByID 		= xenUnifiedDomainLookupByID,
     .domainLookupByUUID 		= xenUnifiedDomainLookupByUUID,
     .domainLookupByName 		= xenUnifiedDomainLookupByName,
Index: src/xen_unified.h
===================================================================
RCS file: /data/cvs/libxen/src/xen_unified.h,v
retrieving revision 1.15
diff -u -p -r1.15 xen_unified.h
--- src/xen_unified.h	20 Aug 2008 20:48:36 -0000	1.15
+++ src/xen_unified.h	9 Oct 2008 14:47:55 -0000
@@ -50,7 +50,7 @@ struct xenUnifiedDriver {
         virDrvGetCapabilities		getCapabilities;
         virDrvListDomains		listDomains;
         virDrvNumOfDomains		numOfDomains;
-        virDrvDomainCreateLinux		domainCreateLinux;
+        virDrvDomainCreateXML		domainCreateXML;
         virDrvDomainSuspend		domainSuspend;
         virDrvDomainResume		domainResume;
         virDrvDomainShutdown		domainShutdown;
Index: src/xend_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/xend_internal.c,v
retrieving revision 1.216
diff -u -p -r1.216 xend_internal.c
--- src/xend_internal.c	6 Oct 2008 19:53:06 -0000	1.216
+++ src/xend_internal.c	9 Oct 2008 14:47:56 -0000
@@ -989,7 +989,7 @@ xenDaemonListDomainsOld(virConnectPtr xe
 
 #ifndef PROXY
 /**
- * xenDaemonDomainCreateLinux:
+ * xenDaemonDomainCreateXML:
  * @xend: A xend instance
  * @sexpr: An S-Expr description of the domain.
  *
@@ -1003,7 +1003,7 @@ xenDaemonListDomainsOld(virConnectPtr xe
  */
 
 int
-xenDaemonDomainCreateLinux(virConnectPtr xend, const char *sexpr)
+xenDaemonDomainCreateXML(virConnectPtr xend, const char *sexpr)
 {
     int ret, serrno;
     char *ptr;
@@ -3790,7 +3790,7 @@ xenDaemonLookupByUUID(virConnectPtr conn
 }
 
 /**
- * xenDaemonCreateLinux:
+ * xenDaemonCreateXML:
  * @conn: pointer to the hypervisor connection
  * @xmlDesc: an XML description of the domain
  * @flags: an optional set of virDomainFlags
@@ -3802,7 +3802,7 @@ xenDaemonLookupByUUID(virConnectPtr conn
  * Returns a new domain object or NULL in case of failure
  */
 static virDomainPtr
-xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
+xenDaemonCreateXML(virConnectPtr conn, const char *xmlDesc,
                      unsigned int flags ATTRIBUTE_UNUSED)
 {
     int ret;
@@ -3825,7 +3825,7 @@ xenDaemonCreateLinux(virConnectPtr conn,
         return (NULL);
     }
 
-    ret = xenDaemonDomainCreateLinux(conn, sexpr);
+    ret = xenDaemonDomainCreateXML(conn, sexpr);
     VIR_FREE(sexpr);
     if (ret != 0) {
         goto error;
@@ -4810,7 +4810,7 @@ struct xenUnifiedDriver xenDaemonDriver 
     NULL,                        /* getCapabilities */
     xenDaemonListDomains,        /* listDomains */
     xenDaemonNumOfDomains,       /* numOfDomains */
-    xenDaemonCreateLinux,        /* domainCreateLinux */
+    xenDaemonCreateXML,          /* domainCreateXML */
     xenDaemonDomainSuspend,      /* domainSuspend */
     xenDaemonDomainResume,       /* domainResume */
     xenDaemonDomainShutdown,     /* domainShutdown */
Index: src/xend_internal.h
===================================================================
RCS file: /data/cvs/libxen/src/xend_internal.h,v
retrieving revision 1.50
diff -u -p -r1.50 xend_internal.h
--- src/xend_internal.h	20 Aug 2008 20:48:36 -0000	1.50
+++ src/xend_internal.h	9 Oct 2008 14:47:56 -0000
@@ -53,7 +53,7 @@ xenDaemonOpen_unix(virConnectPtr conn, c
  * domain will be paused after creation and must be unpaused with
  * xenDaemonResumeDomain() to begin execution.
  */
-    int xenDaemonDomainCreateLinux(virConnectPtr xend, const char *sexpr);
+int xenDaemonDomainCreateXML(virConnectPtr xend, const char *sexpr);
 
 /**
  * \brief Lookup the id of a domain
Index: src/xm_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/xm_internal.c,v
retrieving revision 1.90
diff -u -p -r1.90 xm_internal.c
--- src/xm_internal.c	5 Sep 2008 11:52:12 -0000	1.90
+++ src/xm_internal.c	9 Oct 2008 14:47:56 -0000
@@ -92,7 +92,7 @@ struct xenUnifiedDriver xenXMDriver = {
     NULL, /* getCapabilities */
     NULL, /* listDomains */
     NULL, /* numOfDomains */
-    NULL, /* domainCreateLinux */
+    NULL, /* domainCreateXML */
     NULL, /* domainSuspend */
     NULL, /* domainResume */
     NULL, /* domainShutdown */
@@ -620,7 +620,7 @@ int xenXMDomainGetInfo(virDomainPtr doma
 #define MAX_VFB 1024
 /*
  * Turn a config record into a lump of XML describing the
- * domain, suitable for later feeding for virDomainCreateLinux
+ * domain, suitable for later feeding for virDomainCreateXML
  */
 virDomainDefPtr
 xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
@@ -1253,7 +1253,7 @@ no_memory:
 
 /*
  * Turn a config record into a lump of XML describing the
- * domain, suitable for later feeding for virDomainCreateLinux
+ * domain, suitable for later feeding for virDomainCreateXML
  */
 char *xenXMDomainDumpXML(virDomainPtr domain, int flags) {
     const char *filename;
@@ -1618,7 +1618,7 @@ int xenXMDomainCreate(virDomainPtr domai
         return (-1);
     }
 
-    ret = xenDaemonDomainCreateLinux(domain->conn, sexpr);
+    ret = xenDaemonDomainCreateXML(domain->conn, sexpr);
     VIR_FREE(sexpr);
     if (ret != 0) {
         return (-1);
Index: src/xs_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/xs_internal.c,v
retrieving revision 1.69
diff -u -p -r1.69 xs_internal.c
--- src/xs_internal.c	4 Sep 2008 09:07:42 -0000	1.69
+++ src/xs_internal.c	9 Oct 2008 14:47:56 -0000
@@ -34,7 +34,7 @@
 
 #ifdef __linux__
 #define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
-#elif define(__sun__)
+#elif defined(__sun__)
 #define XEN_HYPERVISOR_SOCKET "/dev/xen/privcmd"
 #else
 #error "unsupported platform"
@@ -53,7 +53,7 @@ struct xenUnifiedDriver xenStoreDriver =
     NULL, /* getCapabilities */
     xenStoreListDomains, /* listDomains */
     NULL, /* numOfDomains */
-    NULL, /* domainCreateLinux */
+    NULL, /* domainCreateXML */
     NULL, /* domainSuspend */
     NULL, /* domainResume */
     xenStoreDomainShutdown, /* domainShutdown */
Index: qemud/remote.c
===================================================================
RCS file: /data/cvs/libxen/qemud/remote.c,v
retrieving revision 1.40
diff -u -p -r1.40 remote.c
--- qemud/remote.c	6 Oct 2008 19:53:06 -0000	1.40
+++ qemud/remote.c	9 Oct 2008 14:47:53 -0000
@@ -1028,16 +1028,16 @@ remoteDispatchDomainCreate (struct qemud
 }
 
 static int
-remoteDispatchDomainCreateLinux (struct qemud_server *server ATTRIBUTE_UNUSED,
+remoteDispatchDomainCreateXML (struct qemud_server *server ATTRIBUTE_UNUSED,
                                  struct qemud_client *client,
                                  remote_message_header *req,
-                                 remote_domain_create_linux_args *args,
-                                 remote_domain_create_linux_ret *ret)
+                                 remote_domain_create_xml_args *args,
+                                 remote_domain_create_xml_ret *ret)
 {
     virDomainPtr dom;
     CHECK_CONN(client);
 
-    dom = virDomainCreateLinux (client->conn, args->xml_desc, args->flags);
+    dom = virDomainCreateXML (client->conn, args->xml_desc, args->flags);
     if (dom == NULL) return -1;
 
     make_nonnull_domain (&ret->dom, dom);
Index: qemud/remote_dispatch_localvars.h
===================================================================
RCS file: /data/cvs/libxen/qemud/remote_dispatch_localvars.h,v
retrieving revision 1.13
diff -u -p -r1.13 remote_dispatch_localvars.h
--- qemud/remote_dispatch_localvars.h	27 Aug 2008 20:05:59 -0000	1.13
+++ qemud/remote_dispatch_localvars.h	9 Oct 2008 14:47:53 -0000
@@ -49,8 +49,8 @@ remote_network_dump_xml_ret lv_remote_ne
 remote_domain_reboot_args lv_remote_domain_reboot_args;
 remote_domain_set_memory_args lv_remote_domain_set_memory_args;
 remote_storage_pool_destroy_args lv_remote_storage_pool_destroy_args;
-remote_domain_create_linux_args lv_remote_domain_create_linux_args;
-remote_domain_create_linux_ret lv_remote_domain_create_linux_ret;
+remote_domain_create_xml_args lv_remote_domain_create_xml_args;
+remote_domain_create_xml_ret lv_remote_domain_create_xml_ret;
 remote_domain_set_scheduler_parameters_args lv_remote_domain_set_scheduler_parameters_args;
 remote_auth_polkit_ret lv_remote_auth_polkit_ret;
 remote_auth_sasl_start_args lv_remote_auth_sasl_start_args;
Index: qemud/remote_dispatch_proc_switch.h
===================================================================
RCS file: /data/cvs/libxen/qemud/remote_dispatch_proc_switch.h,v
retrieving revision 1.14
diff -u -p -r1.14 remote_dispatch_proc_switch.h
--- qemud/remote_dispatch_proc_switch.h	27 Aug 2008 20:05:59 -0000	1.14
+++ qemud/remote_dispatch_proc_switch.h	9 Oct 2008 14:47:54 -0000
@@ -78,13 +78,13 @@ case REMOTE_PROC_DOMAIN_CREATE:
         memset (&lv_remote_domain_create_args, 0, sizeof lv_remote_domain_create_args);
         break;
 case REMOTE_PROC_DOMAIN_CREATE_LINUX:
-        fn = (dispatch_fn) remoteDispatchDomainCreateLinux;
-        args_filter = (xdrproc_t) xdr_remote_domain_create_linux_args;
-        args = (char *) &lv_remote_domain_create_linux_args;
-        memset (&lv_remote_domain_create_linux_args, 0, sizeof lv_remote_domain_create_linux_args);
-        ret_filter = (xdrproc_t) xdr_remote_domain_create_linux_ret;
-        ret = (char *) &lv_remote_domain_create_linux_ret;
-        memset (&lv_remote_domain_create_linux_ret, 0, sizeof lv_remote_domain_create_linux_ret);
+        fn = (dispatch_fn) remoteDispatchDomainCreateXML;
+        args_filter = (xdrproc_t) xdr_remote_domain_create_xml_args;
+        args = (char *) &lv_remote_domain_create_xml_args;
+        memset (&lv_remote_domain_create_xml_args, 0, sizeof lv_remote_domain_create_xml_args);
+        ret_filter = (xdrproc_t) xdr_remote_domain_create_xml_ret;
+        ret = (char *) &lv_remote_domain_create_xml_ret;
+        memset (&lv_remote_domain_create_xml_ret, 0, sizeof lv_remote_domain_create_xml_ret);
         break;
 case REMOTE_PROC_DOMAIN_DEFINE_XML:
         fn = (dispatch_fn) remoteDispatchDomainDefineXml;
Index: qemud/remote_dispatch_prototypes.h
===================================================================
RCS file: /data/cvs/libxen/qemud/remote_dispatch_prototypes.h,v
retrieving revision 1.14
diff -u -p -r1.14 remote_dispatch_prototypes.h
--- qemud/remote_dispatch_prototypes.h	27 Aug 2008 20:05:59 -0000	1.14
+++ qemud/remote_dispatch_prototypes.h	9 Oct 2008 14:47:54 -0000
@@ -13,7 +13,7 @@ static int remoteDispatchDomainBlockPeek
 static int remoteDispatchDomainBlockStats (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_block_stats_args *args, remote_domain_block_stats_ret *ret);
 static int remoteDispatchDomainCoreDump (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_core_dump_args *args, void *ret);
 static int remoteDispatchDomainCreate (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_create_args *args, void *ret);
-static int remoteDispatchDomainCreateLinux (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_create_linux_args *args, remote_domain_create_linux_ret *ret);
+static int remoteDispatchDomainCreateXML (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_create_xml_args *args, remote_domain_create_xml_ret *ret);
 static int remoteDispatchDomainDefineXml (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_define_xml_args *args, remote_domain_define_xml_ret *ret);
 static int remoteDispatchDomainDestroy (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_destroy_args *args, void *ret);
 static int remoteDispatchDomainDetachDevice (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, remote_domain_detach_device_args *args, void *ret);
Index: qemud/remote_protocol.c
===================================================================
RCS file: /data/cvs/libxen/qemud/remote_protocol.c,v
retrieving revision 1.18
diff -u -p -r1.18 remote_protocol.c
--- qemud/remote_protocol.c	5 Sep 2008 12:03:45 -0000	1.18
+++ qemud/remote_protocol.c	9 Oct 2008 14:47:54 -0000
@@ -618,7 +618,7 @@ xdr_remote_num_of_domains_ret (XDR *xdrs
 }
 
 bool_t
-xdr_remote_domain_create_linux_args (XDR *xdrs, remote_domain_create_linux_args *objp)
+xdr_remote_domain_create_xml_args (XDR *xdrs, remote_domain_create_xml_args *objp)
 {
 
          if (!xdr_remote_nonnull_string (xdrs, &objp->xml_desc))
@@ -629,7 +629,7 @@ xdr_remote_domain_create_linux_args (XDR
 }
 
 bool_t
-xdr_remote_domain_create_linux_ret (XDR *xdrs, remote_domain_create_linux_ret *objp)
+xdr_remote_domain_create_xml_ret (XDR *xdrs, remote_domain_create_xml_ret *objp)
 {
 
          if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
Index: qemud/remote_protocol.h
===================================================================
RCS file: /data/cvs/libxen/qemud/remote_protocol.h,v
retrieving revision 1.18
diff -u -p -r1.18 remote_protocol.h
--- qemud/remote_protocol.h	5 Sep 2008 12:03:45 -0000	1.18
+++ qemud/remote_protocol.h	9 Oct 2008 14:47:54 -0000
@@ -318,16 +318,16 @@ struct remote_num_of_domains_ret {
 };
 typedef struct remote_num_of_domains_ret remote_num_of_domains_ret;
 
-struct remote_domain_create_linux_args {
+struct remote_domain_create_xml_args {
         remote_nonnull_string xml_desc;
         int flags;
 };
-typedef struct remote_domain_create_linux_args remote_domain_create_linux_args;
+typedef struct remote_domain_create_xml_args remote_domain_create_xml_args;
 
-struct remote_domain_create_linux_ret {
+struct remote_domain_create_xml_ret {
         remote_nonnull_domain dom;
 };
-typedef struct remote_domain_create_linux_ret remote_domain_create_linux_ret;
+typedef struct remote_domain_create_xml_ret remote_domain_create_xml_ret;
 
 struct remote_domain_lookup_by_id_args {
         int id;
@@ -1264,8 +1264,8 @@ extern  bool_t xdr_remote_domain_memory_
 extern  bool_t xdr_remote_list_domains_args (XDR *, remote_list_domains_args*);
 extern  bool_t xdr_remote_list_domains_ret (XDR *, remote_list_domains_ret*);
 extern  bool_t xdr_remote_num_of_domains_ret (XDR *, remote_num_of_domains_ret*);
-extern  bool_t xdr_remote_domain_create_linux_args (XDR *, remote_domain_create_linux_args*);
-extern  bool_t xdr_remote_domain_create_linux_ret (XDR *, remote_domain_create_linux_ret*);
+extern  bool_t xdr_remote_domain_create_xml_args (XDR *, remote_domain_create_xml_args*);
+extern  bool_t xdr_remote_domain_create_xml_ret (XDR *, remote_domain_create_xml_ret*);
 extern  bool_t xdr_remote_domain_lookup_by_id_args (XDR *, remote_domain_lookup_by_id_args*);
 extern  bool_t xdr_remote_domain_lookup_by_id_ret (XDR *, remote_domain_lookup_by_id_ret*);
 extern  bool_t xdr_remote_domain_lookup_by_uuid_args (XDR *, remote_domain_lookup_by_uuid_args*);
@@ -1445,8 +1445,8 @@ extern bool_t xdr_remote_domain_memory_p
 extern bool_t xdr_remote_list_domains_args ();
 extern bool_t xdr_remote_list_domains_ret ();
 extern bool_t xdr_remote_num_of_domains_ret ();
-extern bool_t xdr_remote_domain_create_linux_args ();
-extern bool_t xdr_remote_domain_create_linux_ret ();
+extern bool_t xdr_remote_domain_create_xml_args ();
+extern bool_t xdr_remote_domain_create_xml_ret ();
 extern bool_t xdr_remote_domain_lookup_by_id_args ();
 extern bool_t xdr_remote_domain_lookup_by_id_ret ();
 extern bool_t xdr_remote_domain_lookup_by_uuid_args ();
--
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]