]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/conf.c: documentation cleanups from Jim Meyering
authorDaniel Veillard <veillard@redhat.com>
Fri, 19 Oct 2007 08:29:13 +0000 (08:29 +0000)
committerDaniel Veillard <veillard@redhat.com>
Fri, 19 Oct 2007 08:29:13 +0000 (08:29 +0000)
* tests/conftest.c: Use fwrite, not printf, since the
  result buffer is not NUL-terminatedi, from Jim Meyering.
* tests/qemuxml2argvtest.c: Initialize vm.migrateFrom[0],
  to avoid "read-uninitialized" error from within
  qemudBuildCommandLinei, from Jim Meyering.
Daniel

ChangeLog
src/conf.c
tests/conftest.c
tests/qemuxml2argvtest.c

index a0d2e581080e47344b855969a21f769b731e078f..81e5a6bf4b21eec9fd6c380dc82a809ad1a09683 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Oct 19 10:24:52 CEST 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/conf.c: documentation cleanups from Jim Meyering
+       * tests/conftest.c: Use fwrite, not printf, since the
+         result buffer is not NUL-terminated.
+       * tests/qemuxml2argvtest.c: Initialize vm.migrateFrom[0],
+         to avoid "read-uninitialized" error from within
+         qemudBuildCommandLine.                   
+
 Wed Oct 17 11:27:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
 
        * libvirt.spec.in (BuildRequires): Add "qemu" (Jim Meyering).
index 3d4615a453564df55f0ac2c14d08279019c37a74..3a637b2c59ea659ade5f4ed9f5788fd72410a854 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * conf.c: parser for a subset of the Python encoded Xen configuration files
  *
- * Copyright (C) 2006 Red Hat, Inc.
+ * Copyright (C) 2006, 2007 Red Hat, Inc.
  *
  * See COPYING.LIB for the License of this software
  *
@@ -916,7 +916,7 @@ error:
 /**
  * __virConfWriteMem:
  * @memory: pointer to the memory to store the config file
- * @len: pointer to the lenght in byte of the store, on output the size
+ * @len: pointer to the length in bytes of the store, on output the size
  * @conf: the conf
  *
  * Writes a configuration file back to a memory area. @len is an IN/OUT
index 16346a49b2c5884ecb0e48ef5655e3cd50636177..604e410ffa2dc7dcf63be7b736348840c98b5e80 100644 (file)
@@ -24,7 +24,10 @@ int main(int argc, char **argv) {
         fprintf(stderr, "Failed to serialize %s back\n", argv[1]);
        exit(3);
     }
-    printf("%s", buffer);
     virConfFree(conf);
+    if (fwrite(buffer, len, 1, stdout) != len) {
+        fprintf(stderr, "Write failed\n");
+       exit(1);
+    }
     exit(0);
 }
index f452db69ed2a88460801e0d1f2a6d61b70401b61..a91cd035a1c0e81f8971e2c22bc7f026270dad71 100644 (file)
@@ -40,6 +40,7 @@ static int testCompareXMLToArgvFiles(const char *xml, const char *cmd) {
     vm.qemuVersion = 0 * 1000 * 100 + (8 * 1000) + 1;
     vm.qemuCmdFlags = QEMUD_CMD_FLAG_VNC_COLON |
         QEMUD_CMD_FLAG_NO_REBOOT;
+    vm.migrateFrom[0] = '\0';
 
     vmdef->vncActivePort = vmdef->vncPort;