]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
17 years agolinux countainers cleanup patches
Daniel Veillard [Mon, 31 Mar 2008 12:02:12 +0000 (12:02 +0000)]
linux countainers cleanup patches
* src/lxc_conf.c src/lxc_conf.h: cleanup patch for the conf driver
  of linux countainers, reuse XPath helpers, make string fields dynamic
  and remove a memory leak.
* src/lxc_driver.c: avoid some problems when the config directory is
  not accessible and for regression tests
Daniel

17 years agoAdded patches for routed networking from Mads Chr. Olesen
Daniel P. Berrange [Fri, 28 Mar 2008 20:38:21 +0000 (20:38 +0000)]
Added patches for routed networking from Mads Chr. Olesen

17 years agoFix output of XML for FS storage pool
Daniel P. Berrange [Fri, 28 Mar 2008 17:56:44 +0000 (17:56 +0000)]
Fix output of XML for FS storage pool

17 years agoTweak masquering rules to only capture traffic leaving the virtual network
Daniel P. Berrange [Fri, 28 Mar 2008 01:05:08 +0000 (01:05 +0000)]
Tweak masquering rules to only capture traffic leaving the virtual network

17 years agolxcError: mark a string and add to the list of nearly-checked functions
Jim Meyering [Thu, 27 Mar 2008 14:02:57 +0000 (14:02 +0000)]
lxcError: mark a string and add to the list of nearly-checked functions

* Makefile.maint (msg_gen_function): Add, but commented-out.
* src/lxc_conf.c (lxcParseXML): Mark a diagnostic for translation.

17 years agotestError: mark most string arguments for translation
Jim Meyering [Thu, 27 Mar 2008 14:01:59 +0000 (14:01 +0000)]
testError: mark most string arguments for translation

* Makefile.maint (msg_gen_function): Add testError
* src/test.c (testDomainSave, testDomainRestore): Mark strings.
(testDomainCoreDump): Likewise.

17 years agoopenvzLog: mark its string arguments for translation
Jim Meyering [Thu, 27 Mar 2008 14:00:28 +0000 (14:00 +0000)]
openvzLog: mark its string arguments for translation

* Makefile.maint (msg_gen_function): Add openvzLog.
* src/openvz_conf.c (openvzAssignVMDef, openvzParseXML): Mark strings.
* src/openvz_driver.c (openvzDomainShutdown, openvzDomainReboot):
(openvzDomainDefineXML, openvzDomainCreateLinux):
(openvzDomainCreate, openvzDomainUndefine): Likewise.

17 years agoerror: mark most string arguments for translation
Jim Meyering [Thu, 27 Mar 2008 13:58:56 +0000 (13:58 +0000)]
error: mark most string arguments for translation

Also mark some arguments to __virRaiseError.
* Makefile.maint (msg_gen_function): Add error.
* po/POTFILES.in: Add src/openvz_conf.c and src/openvz_driver.c.
* src/openvz_conf.c (openvzParseXML, openvzGetVPSInfo): Mark strings.
* src/openvz_driver.c (openvzDomainLookupByID): Likewise.
(openvzDomainLookupByUUID, openvzDomainLookupByName): Likewise.
(openvzDomainGetInfo, openvzDomainShutdown, openvzDomainReboot)
(openvzDomainCreate, openvzDomainUndefine): Likewise.
* src/remote_internal.c (check_cert_file): Likewise.
(negotiate_gnutls_on_connection, verify_certificate): Likewise.
(remoteAuthenticate, addrToString, remoteAuthSASL): Likewise.
(remoteAuthPolkit, call, really_read_buf): Likewise.

17 years agoConvert diagnostics like "VAR > MAX_VAR" to translatable messages.
Jim Meyering [Thu, 27 Mar 2008 13:56:28 +0000 (13:56 +0000)]
Convert diagnostics like "VAR > MAX_VAR" to translatable messages.

* src/remote_internal.c (errorf): New function.
(remoteListDomains, remoteDomainPinVcpu, remoteDomainGetVcpus):
(remoteListDefinedDomains, remoteListNetworks):
(remoteListDefinedNetworks): Convert strings to be translatable,
and also to include offending and maximum values.  Use errorf.

17 years agoqemudReportError: mark for translation string args to this function
Jim Meyering [Thu, 27 Mar 2008 13:53:14 +0000 (13:53 +0000)]
qemudReportError: mark for translation string args to this function

* Makefile.maint (msg_gen_function): Add qemudReportError.
* src/qemu_conf.c (qemudLoadDriverConfig)
(qemudExtractVersion, qemudParseDiskXML, qemudParseInterfaceXML)
(qemudParseInputXML, qemudParseXML, qemudNetworkIfaceConnect)
(qemudBuildCommandLine, qemudSaveConfig, qemudParseVMDeviceDef)
(qemudAssignVMDef, qemudSaveVMDef, qemudSaveNetworkConfig)
(qemudParseDhcpRangesXML, qemudParseNetworkXML)
(qemudAssignNetworkDef, qemudSaveNetworkDef, qemudGenerateXML)
(qemudGenerateNetworkXML, qemudDeleteConfig): Mark strings.
* src/qemu_driver.c (qemudBuildDnsmasqArgv, qemudAddIptablesRules)
(qemudGetCapabilities, qemudDomainGetOSType)
(qemudListDefinedDomains, qemudListNetworks)
(qemudListDefinedNetworks, qemudNetworkGetBridgeName): Mark strings.

17 years agoReportError: mark for translation string args to this function
Jim Meyering [Thu, 27 Mar 2008 13:47:00 +0000 (13:47 +0000)]
ReportError: mark for translation string args to this function

* Makefile.maint (msg_gen_function): Add ReportError.
* src/util.c (_virExec): Mark strings.

17 years agoxenXMError: mark for translation string args to this function
Jim Meyering [Thu, 27 Mar 2008 13:45:26 +0000 (13:45 +0000)]
xenXMError: mark for translation string args to this function

* Makefile.maint (msg_gen_function): Add xenXMError.
* src/xm_internal.c (xenXMParseXMLToConfig, xenXMDomainDefineXML):
(xenXMDomainAttachDevice, xenXMDomainDetachDevice): Mark strings.

17 years agoMark many more strings for translation.
Jim Meyering [Thu, 27 Mar 2008 13:43:01 +0000 (13:43 +0000)]
Mark many more strings for translation.

* Makefile.maint (err_func_re): Add to the list and make it readable.
* po/POTFILES.in: Add src/util.c and src/xm_internal.c, and sort.
* src/storage_backend.c: Fix comment.
* src/util.c (virFileLinkPointsTo): Mark a string.
* qemud/remote.c (remoteDispatchClientRequest): Mark strings.
(remoteDispatchOpen, CHECK_CONN, remoteDispatchGetType): Likewise.
(remoteDispatchDomainGetSchedulerType): Likewise.
(remoteDispatchDomainGetSchedulerParameters): Likewise.
(remoteDispatchDomainSetSchedulerParameters): Likewise.
(remoteDispatchDomainBlockStats): Likewise.
(remoteDispatchDomainInterfaceStats): Likewise.
(remoteDispatchDomainAttachDevice, remoteDispatchDomainCreate):
(remoteDispatchDomainDestroy, remoteDispatchDomainDetachDevice):
(remoteDispatchDomainDumpXml, remoteDispatchDomainGetAutostart):
(remoteDispatchDomainGetInfo, remoteDispatchDomainGetMaxMemory):
(remoteDispatchDomainGetMaxVcpus, remoteDispatchDomainGetOsType):
(remoteDispatchDomainGetVcpus): Likewise.
(remoteDispatchDomainMigratePerform): Likewise.
(remoteDispatchListDefinedDomains, remoteDispatchDomainPinVcpu):
(remoteDispatchDomainReboot, remoteDispatchDomainResume):
(remoteDispatchDomainSave, remoteDispatchDomainCoreDump):
(remoteDispatchDomainSetAutostart): Likewise.
(remoteDispatchDomainSetMaxMemory, remoteDispatchDomainSetMemory):
(remoteDispatchDomainSetVcpus, remoteDispatchDomainShutdown):
(remoteDispatchDomainSuspend, remoteDispatchDomainUndefine):
(remoteDispatchListDefinedNetworks, remoteDispatchListDomains):
(remoteDispatchListNetworks, remoteDispatchNetworkCreate):
(remoteDispatchNetworkDestroy, remoteDispatchNetworkDumpXml):
(remoteDispatchNetworkGetAutostart, remoteDispatchNetworkGetBridgeName):
(remoteDispatchNetworkSetAutostart, remoteDispatchNetworkUndefine):
(addrToString, remoteDispatchAuthSaslInit, remoteDispatchAuthSaslStart):
(remoteDispatchAuthSaslStep, remoteDispatchListDefinedStoragePools):
(remoteDispatchListStoragePools, remoteDispatchStoragePoolCreate):
(remoteDispatchStoragePoolBuild, remoteDispatchStoragePoolDestroy):
(remoteDispatchStoragePoolDelete, remoteDispatchStoragePoolRefresh):
(remoteDispatchStoragePoolGetInfo, remoteDispatchStoragePoolDumpXml):
(remoteDispatchStoragePoolGetAutostart): Likewise.
(remoteDispatchStoragePoolSetAutostart):
(remoteDispatchStoragePoolListVolumes):
(remoteDispatchStoragePoolNumOfVolumes):
(remoteDispatchStoragePoolUndefine, remoteDispatchStorageVolCreateXml):
(remoteDispatchStorageVolDelete, remoteDispatchStorageVolGetInfo):
(remoteDispatchStorageVolDumpXml, remoteDispatchStorageVolGetPath):
(remoteDispatchStorageVolLookupByName): Likewise.
* src/qemu_driver.c (qemudOpenMonitor, qemudStartVMDaemon):
(dhcpStartDhcpDaemon, qemudStartNetworkDaemon):
(qemudDomainSuspend, qemudDomainResume, qemudDomainShutdown):
(qemudDomainGetOSType, qemudDomainSetMaxMemory):
(qemudDomainSetMemory, qemudDomainGetInfo, qemudDomainSave):
(qemudDomainRestore, qemudDomainDumpXML, qemudDomainStart):
(qemudDomainUndefine, qemudDomainChangeCDROM):
(qemudDomainAttachDevice, qemudDomainGetAutostart):
(qemudDomainSetAutostart, qemudDomainInterfaceStats):
(qemudNetworkLookupByUUID, qemudNetworkLookupByName):
(qemudNetworkUndefine, qemudNetworkStart, qemudNetworkDestroy):
(qemudNetworkDumpXML, qemudNetworkGetAutostart):
(qemudNetworkSetAutostart): Likewise.
* src/virsh.c (cmdVcpupin, cmdAttachDevice, cmdDetachDevice): Likewise.
* src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu): Likewise.

17 years agoLinux container fixes, move driver in the daemon.
Daniel Veillard [Thu, 27 Mar 2008 09:34:06 +0000 (09:34 +0000)]
Linux container fixes, move driver in the daemon.
* src/lxc_conf.c src/lxc_conf.h src/lxc_driver.c src/remote_internal.c:
  applied patch from Dan Berrange to change the way the lxc driver
  works, migrating the support in the daemon, it also removes some
  compilation issues and teh way the configuration files are named.
Daniel

17 years agosupport of older versions of iscsiadm.
Daniel Veillard [Thu, 27 Mar 2008 08:11:27 +0000 (08:11 +0000)]
support of older versions of iscsiadm.
* src/storage_backend_iscsi.c: patch from Chris Lalancette to improve
  support with older versions of iscsiadm.
Daniel

17 years ago* src/xen_internal.c proxy/libvirt_proxy.c: fix Xen hypercall for
Daniel Veillard [Wed, 26 Mar 2008 13:03:30 +0000 (13:03 +0000)]
* src/xen_internal.c proxy/libvirt_proxy.c: fix Xen hypercall for
  Xen-3.2, and merged its debugging with the general library facility
Daniel

17 years agoWed Mar 26 12:57:00 UTC 2008 Richard W.M. Jones <rjones@redhat.com>
Richard W.M. Jones [Wed, 26 Mar 2008 13:00:47 +0000 (13:00 +0000)]
Wed Mar 26 12:57:00 UTC 2008 Richard W.M. Jones <rjones@redhat.com>

       * po/lt.po: Fixed typo (Beth Kon).

17 years agoTue Mar 25 10:23:00 UTC 2008 Richard W.M. Jones <rjones@redhat.com>
Richard W.M. Jones [Tue, 25 Mar 2008 10:26:32 +0000 (10:26 +0000)]
Tue Mar 25 10:23:00 UTC 2008 Richard W.M. Jones <rjones@redhat.com>

       * src/virsh.c: Additional error messages for missing
         parameters (Shigeki Sakamoto).

17 years ago* src/qemu_driver.c: remove trailing newlines from error messages
Daniel Veillard [Mon, 24 Mar 2008 10:58:21 +0000 (10:58 +0000)]
* src/qemu_driver.c: remove trailing newlines from error messages
  patch from Guido Günther
Daniel

17 years ago* src/qemu_driver.c: applied patch from Guido Günther to make error
Daniel Veillard [Mon, 24 Mar 2008 10:51:47 +0000 (10:51 +0000)]
* src/qemu_driver.c: applied patch from Guido Günther to make error
  strings as translatable
Daniel

17 years ago* Makefile.maint (err_func_re): Add lxcError.
Jim Meyering [Mon, 24 Mar 2008 10:21:46 +0000 (10:21 +0000)]
* Makefile.maint (err_func_re): Add lxcError.

17 years ago* qemud/remote.c: Don't include <getopt.h>. Not used.
Jim Meyering [Mon, 24 Mar 2008 10:21:03 +0000 (10:21 +0000)]
* qemud/remote.c: Don't include <getopt.h>. Not used.

17 years agoSync Makefile rules from coreutils.
Jim Meyering [Mon, 24 Mar 2008 10:20:15 +0000 (10:20 +0000)]
Sync Makefile rules from coreutils.

* Makefile.maint: Merge.
* GNUmakefile: Update from coreutils.

17 years agoAdd new testing framework and the first test to use it.
Jim Meyering [Mon, 24 Mar 2008 10:19:36 +0000 (10:19 +0000)]
Add new testing framework and the first test to use it.

* tests/Makefile.am (test_scripts): Add vcpupin.
(EXTRA_DIST): Add test-lib.sh.
* tests/test-lib.sh: Testing framework, from coreutils.
* tests/vcpupin: New file.
* build-aux/mktempd: New file, from gnulib.
* bootstrap: Add posix-shell and mktempd to the list of imported modules.
* gnulib/m4/posix-shell.m4: New file, from gnulib.

17 years agoFix bugs in tests/Makefile.am.
Jim Meyering [Mon, 24 Mar 2008 10:18:36 +0000 (10:18 +0000)]
Fix bugs in tests/Makefile.am.

* tests/Makefile.am (TESTS_ENVIRONMENT): Correct invalid
settings of abs_top_builddir and abs_top_srcdir.
Also prepend src/ to PATH, so we test the just-built virsh,
not whatever happens to be in the original $PATH.

17 years ago* src/xend_internal.c: applied patch from Saori Fukuta adding the
Daniel Veillard [Mon, 24 Mar 2008 09:23:32 +0000 (09:23 +0000)]
* src/xend_internal.c: applied patch from Saori Fukuta adding the
  scheduler API for the Xen daemon driver
* po/POTFILES.in: add the two new linux container modules
Daniel

17 years agoInitial Linux containers work
Daniel Veillard [Fri, 21 Mar 2008 15:03:37 +0000 (15:03 +0000)]
Initial Linux containers work
* configure.in include/libvirt/virterror.h src/Makefile.am
  src/driver.h src/lxc_conf.[ch] src/lxc_driver.[ch] src/virterror.c:
  Applied 3 patches from Dave Leskovec for intial support of
  Linux containers, configured off by default, work in progress.
* src/libvirt.c: improve virDomainCreateLinux xmlDesc description
Daniel

17 years ago* src/util.c src/util.h src/xml.c: applied patch from Hiroyuki Kaguchi
Daniel Veillard [Thu, 20 Mar 2008 11:24:30 +0000 (11:24 +0000)]
* src/util.c src/util.h src/xml.c: applied patch from Hiroyuki Kaguchi
  fixing Ethernet MAC addresses parsingand separating as an util
  function, with added comments from Jim Meyering
Daniel

17 years ago* src/qemu_conf.c src/qemu_conf.h src/qemu_driver.c: applied patch
Daniel Veillard [Wed, 19 Mar 2008 14:32:50 +0000 (14:32 +0000)]
* src/qemu_conf.c src/qemu_conf.h src/qemu_driver.c: applied patch
  from Cole Robinson implementing memory operations for qemu driver
Daniel

17 years agoAvoid "make syntax-check" failure.
Jim Meyering [Tue, 18 Mar 2008 22:33:01 +0000 (22:33 +0000)]
Avoid "make syntax-check" failure.

* src/xen_unified.c: Remove trailing blank.

17 years agoUse explicit logic rules for opening Xen sub-drivers
Daniel P. Berrange [Mon, 17 Mar 2008 17:30:48 +0000 (17:30 +0000)]
Use explicit logic rules for opening Xen sub-drivers

17 years agoTreat ENOTSUP like ENODATA, after failed fgetfilecon.
Jim Meyering [Mon, 17 Mar 2008 16:57:21 +0000 (16:57 +0000)]
Treat ENOTSUP like ENODATA, after failed fgetfilecon.

* src/storage_backend.c (virStorageBackendUpdateVolInfoFD): Treat a
failed fgetfilecon with errno == ENOTSUP the same as for ENODATA.

17 years agofixed DefinedDomains function comments c.f. 437216
Daniel Veillard [Mon, 17 Mar 2008 16:43:54 +0000 (16:43 +0000)]
fixed DefinedDomains function comments c.f. 437216
* libvirt.c: fixed DefinedDomains function comments c.f. 437216
* docs/libvirt-*.xml docs/*/libvirt-libvirt.html: regenerated
Daniel

17 years agoFix creation of unmanaged pools
Daniel P. Berrange [Mon, 17 Mar 2008 15:10:48 +0000 (15:10 +0000)]
Fix creation of unmanaged pools

17 years agoCope with missing selinux attribute
Daniel P. Berrange [Mon, 17 Mar 2008 15:09:38 +0000 (15:09 +0000)]
Cope with missing selinux attribute

17 years ago* src/libvirt.c docs/libvirt-*.xml docs/html/libvirt-libvirt.html:
Daniel Veillard [Mon, 17 Mar 2008 10:48:02 +0000 (10:48 +0000)]
* src/libvirt.c docs/libvirt-*.xml docs/html/libvirt-libvirt.html:
  fixed a few missing argument descriptions and regenerated.
Daniel

17 years ago* NEWS virsh.1 docs//* include/libvirt/libvirt.h[.in] qemud/mdns.h
Daniel Veillard [Mon, 17 Mar 2008 10:27:31 +0000 (10:27 +0000)]
* NEWS virsh.1 docs//* include/libvirt/libvirt.h[.in] qemud/mdns.h
  src/libvirt.c src/qemu.conf src/remote_internal.c src/xend_internal.c
  tests/confdata/libvirtd.conf tests/confdata/libvirtd.out: patch from
  Atsushi SAKAI fixing a ot more typo
Daniel

17 years agoDon't set MAC on TAP devs. Pass TAP device name to QEMU
Daniel P. Berrange [Fri, 14 Mar 2008 20:30:03 +0000 (20:30 +0000)]
Don't set MAC on TAP devs. Pass TAP device name to QEMU

17 years ago* po/*: updated translations
Daniel Veillard [Fri, 14 Mar 2008 15:57:02 +0000 (15:57 +0000)]
* po/*: updated translations
Daniel

17 years agotypo
Daniel Veillard [Fri, 14 Mar 2008 15:31:08 +0000 (15:31 +0000)]
typo
* src/bridge.c: fix a typo in a comment
Daniel

17 years agoString fixes #436620
Daniel Veillard [Fri, 14 Mar 2008 15:21:15 +0000 (15:21 +0000)]
String fixes #436620
* qemud/qemud.c src/virsh.c: fixing some user facing strings
  problems pointed out by Francesco Tombolini should fix #436620
Daniel

17 years agoSmall cleanup, Daniel
Daniel Veillard [Fri, 14 Mar 2008 11:14:41 +0000 (11:14 +0000)]
Small cleanup, Daniel

17 years agoFix typo "informations" -> "information" (Atsushi SAKAI and
Richard W.M. Jones [Fri, 14 Mar 2008 11:08:03 +0000 (11:08 +0000)]
Fix typo "informations" -> "information" (Atsushi SAKAI and
Saori FUKUTA).

17 years ago* src/libvirt.c: virDomainSetSchedulerParameters need to be
Daniel Veillard [Thu, 13 Mar 2008 09:27:46 +0000 (09:27 +0000)]
* src/libvirt.c: virDomainSetSchedulerParameters need to be
  blocked on read-only connections, patch from Saori Fukuta
Daniel

17 years ago* src/bridge.c src/virsh.c: typo fixes from Atsushi SAKAI
Daniel Veillard [Thu, 13 Mar 2008 09:21:41 +0000 (09:21 +0000)]
* src/bridge.c src/virsh.c: typo fixes from Atsushi SAKAI
daniel

17 years ago* src/qemu_conf.c src/qemu_driver.c: patch from Cole Robinson
Daniel Veillard [Thu, 13 Mar 2008 09:17:45 +0000 (09:17 +0000)]
* src/qemu_conf.c src/qemu_driver.c: patch from Cole Robinson
  fixing CD Rom change on live QEmu/KVM domains.
Daniel

17 years agoRemove unused variable
Daniel P. Berrange [Tue, 11 Mar 2008 16:01:23 +0000 (16:01 +0000)]
Remove unused variable

17 years agoRemove use of polkit-grant. Keep stdio open when running polkit-auth
Daniel P. Berrange [Tue, 11 Mar 2008 14:49:04 +0000 (14:49 +0000)]
Remove use of polkit-grant. Keep stdio open when running polkit-auth

17 years agoDon't force Xen connections to readonly when non-root
Daniel P. Berrange [Tue, 11 Mar 2008 14:25:49 +0000 (14:25 +0000)]
Don't force Xen connections to readonly when non-root

17 years agoDon't run cleannup code for parent process in daemon mode
Daniel P. Berrange [Tue, 11 Mar 2008 14:22:12 +0000 (14:22 +0000)]
Don't run cleannup code for parent process in daemon mode

17 years ago* docs/libvir.html docs/storage.html: apply documentation fixes
Daniel Veillard [Fri, 7 Mar 2008 11:13:02 +0000 (11:13 +0000)]
* docs/libvir.html docs/storage.html: apply documentation fixes
  and typos cleanup from Atsushi Sakai
Daniel

17 years ago* src/xend_internal.c: applied patch from Cole Robinson to not
Daniel Veillard [Fri, 7 Mar 2008 09:23:30 +0000 (09:23 +0000)]
* src/xend_internal.c: applied patch from Cole Robinson to not
  loose the boot tag when defining a fully virtualized xen domain
Daniel

17 years agoMake iSCSI login actually work
Richard W.M. Jones [Tue, 4 Mar 2008 20:02:34 +0000 (20:02 +0000)]
Make iSCSI login actually work
* src/storage_backend_iscsi.c: Make iSCSI login actually work
  (Chris Lalancette).

17 years agoReport error when vcpupin is given bad vCPU number.
Richard W.M. Jones [Tue, 4 Mar 2008 19:59:56 +0000 (19:59 +0000)]
Report error when vcpupin is given bad vCPU number.
* src/virsh.c: Report error when vcpupin is given bad vCPU number
  (Shigeki Sakamoto).

17 years agofix typo in comment
Jim Meyering [Mon, 3 Mar 2008 23:06:02 +0000 (23:06 +0000)]
fix typo in comment

17 years agoAlso ignore leading zeros when comparing MAC addresses.
Jim Meyering [Mon, 3 Mar 2008 20:39:52 +0000 (20:39 +0000)]
Also ignore leading zeros when comparing MAC addresses.

* src/util.c: Include <ctype.h>.
(TOLOWER): Define.
(__virMacAddrCompare): Rewrite to also ignore leading zeros.

17 years ago* src/capabilities.c: Cole Robinson pointed out a well formedness
Daniel Veillard [Mon, 3 Mar 2008 20:21:21 +0000 (20:21 +0000)]
* src/capabilities.c: Cole Robinson pointed out a well formedness
  problem when generating the capabilities in the test driver.
Daniel

17 years agoDon't use first byte of string as a pointer.
Jim Meyering [Mon, 3 Mar 2008 18:11:16 +0000 (18:11 +0000)]
Don't use first byte of string as a pointer.

* src/qemu_conf.c (qemudReportError): Use the pointer, errorMessage,
not its first byte, errorMessage[0].

17 years agoAvoid segfault upon early libvirtd failure.
Jim Meyering [Mon, 3 Mar 2008 18:10:19 +0000 (18:10 +0000)]
Avoid segfault upon early libvirtd failure.

* qemud/qemud.c (main): Don't call qemudCleanup on an
uninitialized pointer.

17 years agoRelease of 0.4.1
Daniel Veillard [Mon, 3 Mar 2008 14:42:37 +0000 (14:42 +0000)]
Release of 0.4.1
* NEWS configure.in libvirt.spec.in docs/* include/libvirt/libvirt.h
  po/*: preparing release of libvirt-0.4.1
Daniel

17 years agoPlug saslUsernameWhitelist leak.
Jim Meyering [Mon, 3 Mar 2008 13:17:05 +0000 (13:17 +0000)]
Plug saslUsernameWhitelist leak.

* qemud/qemud.c (qemudCleanup): Free the array as well as
the strings in it.

17 years agoPlug skipped-qemudCleanup leak.
Jim Meyering [Mon, 3 Mar 2008 13:16:31 +0000 (13:16 +0000)]
Plug skipped-qemudCleanup leak.

* qemud/qemud.c (main): Call qemudCleanup also upon failure.
Otherwise, an error return would skip it and induce leaks.

17 years agoPlug remoteReadConfigFile leak.
Jim Meyering [Mon, 3 Mar 2008 13:15:57 +0000 (13:15 +0000)]
Plug remoteReadConfigFile leak.

* qemud/qemud.c (remoteReadConfigFile): Be careful to free
"conf" after a successful virConfReadFile.

17 years agoPlug two leaks: host.migrateTrans and arch.name
Jim Meyering [Mon, 3 Mar 2008 13:15:14 +0000 (13:15 +0000)]
Plug two leaks: host.migrateTrans and arch.name

* src/capabilities.c (virCapabilitiesFree): Free host.migrateTrans.
(virCapabilitiesFreeGuest): Free arch.name member.

17 years agoPlug virCapabilities*GuestDomain leak.
Jim Meyering [Mon, 3 Mar 2008 13:14:26 +0000 (13:14 +0000)]
Plug virCapabilities*GuestDomain leak.

* src/capabilities.c (virCapabilitiesFreeGuestDomain): Free dom->type.
(virCapabilitiesAddGuestDomain): Remove duplicate strdup stmt.

17 years agomissing comments for _virDomainBlockStats fields
Daniel Veillard [Mon, 3 Mar 2008 06:18:06 +0000 (06:18 +0000)]
missing comments for _virDomainBlockStats fields
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in:
  missing comments for _virDomainBlockStats fields
* docs/*: rebuilt docs
Daniel

17 years agofix a broken line split
Daniel Veillard [Fri, 29 Feb 2008 17:02:41 +0000 (17:02 +0000)]
fix a broken line split
* qemud/Makefile.am: fix a broken line split
Daniel

17 years agoMany typos fixed (Atsushi SAKAI).
Richard W.M. Jones [Fri, 29 Feb 2008 12:53:10 +0000 (12:53 +0000)]
Many typos fixed (Atsushi SAKAI).

17 years agoRewrite test-coverage rules to accommodate multiple .o files per .c.
Jim Meyering [Thu, 28 Feb 2008 17:07:37 +0000 (17:07 +0000)]
Rewrite test-coverage rules to accommodate multiple .o files per .c.

* src/Makefile.am (cov): Rewrite rule to merge gcov results corresponding
to two .o files: the libvirt_la- one, and the libvirt_test_la- one.
(tst): Remove unused rule.
* configure.in (LV_LIBTOOL_OBJDIR): Define and AC_SUBST.

17 years agoAvoid link errors with "configure --disable-shared".
Jim Meyering [Thu, 28 Feb 2008 17:06:32 +0000 (17:06 +0000)]
Avoid link errors with "configure --disable-shared".

* src/Makefile.am: Create a convenience library, libvirt_test.la,
and don't restrict access to *its* symbols.
* tests/Makefile.am (LDADDS): Add ../src/libvirt_test.la, so that
"configure --disable-shared" no longer provokes link errors.
(LIBVIRT): Remove definition.
(LDADDS): Remove use.
($(LIBVIRT)): Remove rule.
(LDADDS): Use the new convenience library instead.
(CLEANFILES): Define.
* docs/examples/index.py (dump_Makefile): Append $(COVERAGE_LDFLAGS),
to the LDADDS definition, to avoid link error with the combination of
--enable-test-coverage and --disable-shared.
* docs/examples/Makefile.am: Regenerate.
* docs/examples/index.html: Likewise.
* qemud/Makefile.am (libvirtd_LDFLAGS): Append $(COVERAGE_LDFLAGS).
* src/libvirt_sym.version: Remove some SP-before-TAB.

17 years agoFix qemudReportError.
Daniel Veillard [Thu, 28 Feb 2008 11:17:49 +0000 (11:17 +0000)]
Fix qemudReportError.
* src/qemu_conf.c: applied patch from Cole Robinson to use virErrorMsg
  in qemudReportError.
Daniel

17 years agoTypo.
Richard W.M. Jones [Thu, 28 Feb 2008 11:01:17 +0000 (11:01 +0000)]
Typo.

17 years agoSet MAC address on TUN device for Xenner compatability
Daniel P. Berrange [Thu, 28 Feb 2008 01:23:14 +0000 (01:23 +0000)]
Set MAC address on TUN device for Xenner compatability

17 years agoMake qemud/'s rpcgen rules work.
Jim Meyering [Wed, 27 Feb 2008 19:12:58 +0000 (19:12 +0000)]
Make qemud/'s rpcgen rules work.

* qemud/Makefile.am (SUFFIXES): Define to .x before implicit rule.

17 years agovirMacAddrCompare for comparing MAC addresses
Richard W.M. Jones [Wed, 27 Feb 2008 16:14:44 +0000 (16:14 +0000)]
virMacAddrCompare for comparing MAC addresses
* src/util.c, src/util.h, src/libvirt_sym.version: Added
  virMacAddrCompare utility function for comparing MAC
  addresses.
* src/virsh.c, src/xm_internal.c: Use virMacAddrCompare
  to compare addresses.  (Shigeki Sakamoto and Richard Jones).

17 years agoAvoid "make distcheck" failure.
Jim Meyering [Wed, 27 Feb 2008 15:17:45 +0000 (15:17 +0000)]
Avoid "make distcheck" failure.

* src/Makefile.am (virsh_SOURCES): Add util-lib.h.

17 years agoFix a "make syntax-check" failure.
Jim Meyering [Wed, 27 Feb 2008 14:40:19 +0000 (14:40 +0000)]
Fix a "make syntax-check" failure.

* src/capabilities.c: Include <config.h> from the .c file,
* src/capabilities.h: ... not from the .h file.

17 years agoFix typos (Atsushi SAKAI).
Richard W.M. Jones [Wed, 27 Feb 2008 10:37:19 +0000 (10:37 +0000)]
Fix typos (Atsushi SAKAI).

17 years agoAdd formal internal capabilities API and update drivers to use it
Daniel P. Berrange [Wed, 27 Feb 2008 04:35:08 +0000 (04:35 +0000)]
Add formal internal capabilities API and update drivers to use it

17 years agoImplement virDomainBlockStats for QEMU/KVM.
Richard W.M. Jones [Tue, 26 Feb 2008 18:41:43 +0000 (18:41 +0000)]
Implement virDomainBlockStats for QEMU/KVM.
* src/qemu_driver.c: Implement virDomainBlockStats for QEMU/KVM
  using QEMU/KVM 'info blockstats' command (Richard Jones).
* src/qemu_driver.c, src/qemu_conf.h: const-correctness
  fixes (Jim Meyering).

17 years agoNo address attribute in Xen domain XML.
Richard W.M. Jones [Tue, 26 Feb 2008 18:31:57 +0000 (18:31 +0000)]
No address attribute in Xen domain XML.
* src/xm_internal.c: handle the case where <mac/> clause
  in Xen domain interface has no address attribute
  (Shigeki Sakamoto).

17 years agoOops trailing blank, Daniel
Daniel Veillard [Tue, 26 Feb 2008 07:06:48 +0000 (07:06 +0000)]
Oops trailing blank, Daniel

17 years ago* src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
Daniel Veillard [Tue, 26 Feb 2008 07:05:18 +0000 (07:05 +0000)]
* src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
  src/remote_internal.c src/test.c src/util.c src/util.h
  src/xen_unified.c: added probe interface at the driver level,
  use that to improve default hypervisor selection in the absence
  of a given URI when connecting
Daniel

17 years agofix compilation against static libraries
Daniel Veillard [Mon, 25 Feb 2008 13:55:56 +0000 (13:55 +0000)]
fix compilation against static libraries
* src/Makefile.am src/util-lib.h: fix done with Jim to allow
  compilation of virsh with the static libraries.
Daniel

17 years agoAvoid new "make syntax-check" failures.
Jim Meyering [Mon, 25 Feb 2008 10:00:16 +0000 (10:00 +0000)]
Avoid new "make syntax-check" failures.

* .x-sc_avoid_write: Exempt src/util-lib.c, too.
* Makefile.maint (sc_unmarked_diagnostics): Filter out false positives.
* src/storage_backend_fs.c (virStorageBackendFileSystemVolCreate):
Use safewrite, not write.
* src/storage_backend_logical.c (virStorageBackendLogicalBuildPool): Likewise.

17 years agoavoid format string warnings
Jim Meyering [Fri, 22 Feb 2008 16:26:13 +0000 (16:26 +0000)]
avoid format string warnings

Avoid warnings like this:
file:nnn:format not a string literal and no format arguments

* qemud/qemud.c: Insert a "%s" format argument.
* qemud/remote.c: Likewise.
* src/iptables.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/storage_backend.c: Likewise.
* src/storage_backend_fs.c: Likewise.
* src/storage_backend_iscsi.c Likewise.
* src/storage_backend_logical.c: Likewise.
* src/storage_conf.c: Likewise.
* src/storage_driver.c: Likewise.

17 years agoUse safewrite in place of write, in many cases.
Jim Meyering [Fri, 22 Feb 2008 15:55:04 +0000 (15:55 +0000)]
Use safewrite in place of write, in many cases.

Also add "make syntax-check" rules to ensure no new uses sneak in.

There are many uses of write like this:

    if (write (fd, xml, towrite) != towrite)
        return -1;

The problem is that the syscall can succeed, yet write less than
the requested number of bytes, so the caller should retry
rather than simply failing.

This patch changes most of them to use util.c's safewrite wrapper,
which encapsulates the process.  Also, there were a few cases in
which the retry loop was open-coded, and I replaced those, too.

* Makefile.maint (sc_avoid_write): New rule, to avoid recurrence.
* .x-sc_avoid_write: New file.  Record two legitimate exemptions.
* qemud/qemud.c (sig_handler, qemudClientWriteBuf): Use safewrite, not write.
* src/conf.c (__virConfWriteFile): Likewise.
* src/qemu_conf.c (qemudSaveConfig, qemudSaveNetworkConfig): Likewise.
* src/qemu_driver.c (qemudWaitForMonitor, qemudStartVMDaemon)
(qemudVMData, PROC_IP_FORWARD): Likewise.
* proxy/libvirt_proxy.c: Include "util.h".
(proxyWriteClientSocket): Use safewrite.
* src/test.c (testDomainSave, testDomainCoreDump): Likewise.
* src/proxy_internal.c (virProxyWriteClientSocket): Likewise.
* src/virsh.c: Include "util-lib.h".
(vshOutputLogFile): Use safewrite.
* src/console.c: Include "util-lib.h".
(vshRunConsole): Use safewrite.

17 years agoMove safewrite and saferead to a separate file.
Jim Meyering [Fri, 22 Feb 2008 15:53:13 +0000 (15:53 +0000)]
Move safewrite and saferead to a separate file.

We currently use safewrite from inside libvirt and don't want to publish
any such function name.  However, we do want to use it in applications
like virsh, libvirtd and libvirt_proxy that link with libvirt.  To that
end, this change moves that function definition (along with the nearly
identical saferead) into a new file, util-lib.c.  To avoid maintaining
separate copies of even such small functions, we simply include that new
file from util.c.  Then, the separate applications that need to use
safewrite simply compile and link with util-lib.c.

Of course, this does mean that each of those applications will
containing two copies of these functions.  However, the functions
are so small that it's not worth worrying about that.

* src/util.c (saferead, safewrite): Move function definitions to
util-lib.c and include that .c file.
* src/util-lib.c (saferead, safewrite): New file.  Functions from src/util.c
with slight change (s/int r =/ssize_t r =/) to reflect read/write return type.
* src/util-lib.h: Declare the two moved functions.
* src/util.h: Remove declarations.  Include src/util-lib.h.
* proxy/Makefile.am (libvirt_proxy_SOURCES): Add src/util-lib.c.
* qemud/Makefile.am (libvirtd_SOURCES): Likewise.
* src/Makefile.am (virsh_SOURCES): Add util-lib.c.  Remove some SP-before-TAB.

17 years agoWith --enable-iptables-lokkit=no, avoid warning about unused parameter.
Jim Meyering [Fri, 22 Feb 2008 12:34:27 +0000 (12:34 +0000)]
With --enable-iptables-lokkit=no, avoid warning about unused parameter.

* src/iptables.c (iptRulesSave) [!ENABLE_IPTABLES_LOKKIT]:
Mark parameter as used.

17 years agoWith --without-xen, avoid warning about unused function.
Jim Meyering [Fri, 22 Feb 2008 12:33:47 +0000 (12:33 +0000)]
With --without-xen, avoid warning about unused function.

* tests/statstest.c (testQuietError) [!WITH_XEN]: Don't define.

17 years agoRewrite openvzSetUUID.
Jim Meyering [Thu, 21 Feb 2008 18:48:06 +0000 (18:48 +0000)]
Rewrite openvzSetUUID.

* src/openvz_conf.c (openvzSetUUID): Rewrite to avoid unchecked
lseek, write, and close as well as a potential file descriptor leak.

17 years agoHandle failed openvzLocateConfDir.
Jim Meyering [Thu, 21 Feb 2008 18:22:45 +0000 (18:22 +0000)]
Handle failed openvzLocateConfDir.

* src/openvz_conf.c (openvzLocateConfDir, openvzGetVPSUUID):
(openvzSetUUID): Don't dereference NULL upon failure.

17 years agoFix double-free in OpenVZ driver.
Richard W.M. Jones [Thu, 21 Feb 2008 15:20:36 +0000 (15:20 +0000)]
Fix double-free in OpenVZ driver.
        * src/openvz_conf.c: Double-free fix (Anton Protopopov).

17 years agoAdded missing symbol export
Daniel P. Berrange [Thu, 21 Feb 2008 03:53:03 +0000 (03:53 +0000)]
Added missing symbol export

17 years agoAvoid "make syntax-check" failure.
Jim Meyering [Wed, 20 Feb 2008 17:26:01 +0000 (17:26 +0000)]
Avoid "make syntax-check" failure.

* docs/examples/index.py: Don't emit trailing blanks.
* docs/examples/Makefile.am: Regenerate.

17 years agoUpdate to work with new policy kit APIs
Daniel P. Berrange [Wed, 20 Feb 2008 16:54:35 +0000 (16:54 +0000)]
Update to work with new policy kit APIs

17 years agoUpdate po files with latest translatable strings
Daniel P. Berrange [Wed, 20 Feb 2008 16:08:56 +0000 (16:08 +0000)]
Update po files with latest translatable strings

17 years agoIgnore libvirt_parthelper binary
Daniel P. Berrange [Wed, 20 Feb 2008 15:58:38 +0000 (15:58 +0000)]
Ignore libvirt_parthelper binary

17 years agoAdded docs on storage management capabilities
Daniel P. Berrange [Wed, 20 Feb 2008 15:58:06 +0000 (15:58 +0000)]
Added docs on storage management capabilities

17 years agoIgnore doc files for syntax check
Daniel P. Berrange [Wed, 20 Feb 2008 15:57:34 +0000 (15:57 +0000)]
Ignore doc files for syntax check