提交 69b9fcf2 编写于 作者: D Daniel Veillard

* src/conf.c: documentation cleanups from Jim Meyering

* 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
上级 171afdf6
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).
......
/**
* 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
......
......@@ -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);
}
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册