Re: [PATCH] LXC: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML()

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

 



On 25.06.2014 10:16, Wang Rui wrote:
From: Yue wenyuan <yuewenyuan@xxxxxxxxxx>

The comments for lxcDomainCreateXMLWithFiles are out of date. So update them.
And add comments for lxcDomainCreateXML

Signed-off-by: Wang Rui <moon.wangrui@xxxxxxxxxx>
Signed-off-by: Yue wenyuan <yuewenyuan@xxxxxxxxxx>
---
  src/lxc/lxc_driver.c | 17 ++++++++++++++---
  1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 06f3e18..11bfb80 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1122,14 +1122,16 @@ static int lxcDomainCreateWithFlags(virDomainPtr dom,
  }

  /**
- * lxcDomainCreateXML:
+ * lxcDomainCreateXMLWithFiles:
   * @conn: pointer to connection
+ * @nfiles: number of file descriptors passed
+ * @files: list of file descriptors passed
   * @xml: XML definition of domain
   * @flags: Must be 0 for now

I rather keep the ordering so it matches the ordering of the functions arguments. Then, flags doesn't have to be zero only, the VIR_DOMAIN_START_AUTODESTROY flag is supported too.

   *
   * Creates a domain based on xml and starts it
   *
- * Returns 0 on success or -1 in case of error
+ * Returns a new domain object or NULL in case of failure.
   */
  static virDomainPtr
  lxcDomainCreateXMLWithFiles(virConnectPtr conn,
@@ -1209,7 +1211,16 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
      return dom;
  }

-
+/**
+ * lxcDomainCreateXML:
+ * @conn: pointer to connection
+ * @xml: XML definition of domain
+ * @flags: Must be 0 for now

Same applies here.

+ *
+ * Creates a domain based on xml and starts it
+ *
+ * Returns a new domain object or NULL in case of failure.
+ */
  static virDomainPtr
  lxcDomainCreateXML(virConnectPtr conn,
                     const char *xml,



ACKed with this squashed in:

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 455d640..a9a87ea 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1128,10 +1128,10 @@ static int lxcDomainCreateWithFlags(virDomainPtr dom,
 /**
  * lxcDomainCreateXMLWithFiles:
  * @conn: pointer to connection
+ * @xml: XML definition of domain
  * @nfiles: number of file descriptors passed
  * @files: list of file descriptors passed
- * @xml: XML definition of domain
- * @flags: Must be 0 for now
+ * @flags: bitwise-OR of supported virDomainCreateFlags
  *
  * Creates a domain based on xml and starts it
  *
@@ -1219,7 +1219,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
  * lxcDomainCreateXML:
  * @conn: pointer to connection
  * @xml: XML definition of domain
- * @flags: Must be 0 for now
+ * @flags: bitwise-OR of supported virDomainCreateFlags
  *
  * Creates a domain based on xml and starts it
  *


Fixed and pushed. Congratulations on your first libvirt contribution!

Michal

--
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]