Commit Graph

3032 Commits

Author SHA1 Message Date
Daniel Veillard
c5a305584f Deprecate lzma and lzop in favor of xz, add dep
* src/qemu_driver.c: drop lzma and lzop images compression options
  as they are deprecated by xz
* libvirt.spec.in: add requires for xz/bzip2/gzip as they are needed
  to implement the compression options
2009-09-09 16:44:44 +02:00
Maximilian Wilhelm
56ad465675 Check for libssh2 >= 1.0 for phy driver
* configure.in: phyp driver uses libssh2_session_block_directions()
  which is only available in libssh2 >= 1.0, so check for this symbol
  too when configuring
2009-09-09 16:21:38 +02:00
Jim Meyering
aec22258ef qemu_driver.c: factor out duplication in compression-type handling
* src/qemu_driver.c (QEMUD_SAVE_FORMAT_LAST): Define.
(qemudSaveCompressionTypeFromString): Declare.
(qemudSaveCompressionTypeToString): Declare.
(qemudDomainSave): Use those functions rather than open-coding them.
Use "cat >> '%s' ..." in place of equivalent
"dd of='%s' oflag=append conv=notrunc ...".
2009-09-09 12:11:34 +02:00
Jim Meyering
1aec7d8606 also allow use of XZ for Qemu image compression
* src/qemu_driver.c (enum qemud_save_formats) [QEMUD_SAVE_FORMAT_XZ]:
New member.
[QEMUD_SAVE_FORMAT_LZMA]: Mark as deprecated.
Use an explicit value for each member.
(qemudDomainSave, qemudDomainRestore): Handle the new member.
* src/qemu.conf: Mention xz, too.
2009-09-09 12:11:34 +02:00
Jim Meyering
5965de2f4d openvz_conf.c: remove dead store to "p"; use strchrnul
* src/openvz_conf.c (openvzReadNetworkConf): Replace open-coded
while loop with equivalent use of strchrnul.
* bootstrap (modules): Add strchrnul.
2009-09-09 12:11:34 +02:00
Jim Meyering
30506b9216 build: update gnulib submodule to latest 2009-09-09 12:11:29 +02:00
Daniel Veillard
4ae51ca54e Remove some tabs used for indent 2009-09-08 17:32:57 +02:00
Matthias Bolte
6fcac926fb Avoid another leak in src/xend_internal.c
* src/xend_internal.c: in xenDaemonLookupByID() if virGetDomain fails
  free up the name
2009-09-08 16:51:26 +02:00
Daniel Veillard
657326cfe3 Updated a number of localizations and regenerated 2009-09-08 16:14:08 +02:00
Daniel Veillard
f54de34ba4 Add flags and requires for Multipath storage
* libvirt.spec.in: the new multipath module requires device-mapper
  and device-mapper-devel for build
2009-09-08 16:07:54 +02:00
Dave Allan
ee8a06f833 Multipath storage support module
* configure.in src/Makefile.am src/storage_backend.[ch]
  src/storage_conf.[ch] src/storage_backend_mpath.[ch] po/POTFILES.in:
  add a new module for storage multipath, it requires device-mapper
2009-09-08 15:47:45 +02:00
Matthias Bolte
1128cc939d Avoid a leak in xenDaemonLookupByID
* src/xend_internal.c: free name in xenDaemonLookupByID() if
  virGetDomain() fails
2009-09-08 14:42:10 +02:00
Miloslav Trmač
f125d3265a Add a missing comment
* src/libvirt_private.syms: Add a missing comment for
  storage_encryption_conf.h entries
2009-09-08 13:33:35 +02:00
Miloslav Trmač
ca8a932c87 Fix a pasto in storage_encryption_conf.c
* src/storage_encryption_conf.c: small typo fix in top comment
2009-09-08 13:30:45 +02:00
Jim Meyering
f7d5b4d613 xm_internal.c: remove four useless comparisons after strchr
* src/xm_internal.c (xenXMDomainConfigParse): After t=strchr...
don't test *t; it's known.  This was *not* detected by clang,
but I spotted it since once instance was in the vicinity of the
dead increment of "data".
2009-09-07 18:14:41 +02:00
Jim Meyering
aecae56071 xm_internal.c: remove dead increment of "data"
* src/xm_internal.c (xenXMDomainConfigParse): Don't increment it.
2009-09-07 18:14:41 +02:00
Jim Meyering
130634dd7c network_driver.c: remove dead store to "err"
* src/network_driver.c (networkSetAutostart): ...and its decl.
2009-09-07 18:13:43 +02:00
Jim Meyering
1fcaae34e1 iptables.c: remove dead store to "s"
* src/iptables.c (iptablesAddRemoveRule): Remove dead store.
2009-09-07 18:13:43 +02:00
Jim Meyering
94f0c4abd9 util.c: avoid dead store to "flag"
* src/util.c (virExecDaemonize): Change flag |= VAR to "flag | VAR".
2009-09-07 18:13:43 +02:00
Jim Meyering
1ad59dd152 domain_conf.c: remove two dead stores
* src/domain_conf.c (virDomainSaveXML): Remove use and decl of "err".
(virDomainDefParseXML): Likewise.
2009-09-07 18:13:42 +02:00
Jim Meyering
bc8bcdcb24 xm_internal.c: remove two ret=... dead stores
* src/xm_internal.c (xenXMDomainCreate): Remove dead stores.
2009-09-07 18:13:42 +02:00
Jim Meyering
577ab7bae0 xm_internal.c: remove dead stores of local, "type"
* src/xm_internal.c (xenXMDomainConfigParse): Remove declaration
and useless containing if-block, too.
2009-09-07 18:13:42 +02:00
Pritesh Kothari
089ef25a85 VBox fix minor bugs in display and added OOM checks
* src/vbox/vbox_tmpl.c: minor bug in selecting the graphics type. if the
  graphics type was desktop it was assumed that display is set for it,
  and thus crashed on strdup. Also adds a number of missing OOM checks.
2009-09-07 17:44:12 +02:00
Jim Meyering
9323717b47 network_conf.c: remove dead store to "err"
* src/network_conf.c (virNetworkDefParseXML): ...and its decl.
2009-09-07 17:23:10 +02:00
Jim Meyering
a7848c4502 openvz_driver.c: avoid dead store to "err"
* src/openvz_driver.c (openvzGenerateContainerVethName): Remove use
and decl of "err".
2009-09-07 17:21:29 +02:00
Jim Meyering
e2cd26ee70 xend_internal.c: Remove two dead stores to "ret"
* src/xend_internal.c (xenDaemonCreateXML): Don't set "ret" after
last use.
2009-09-07 17:21:23 +02:00
Jim Meyering
6f91c5b5ea storage_driver.c: remove two dead stores to "backend"
* src/storage_driver.c (storagePoolGetInfo, storagePoolDefine):
Remove variable, backend, since its value was never used.
2009-09-07 17:17:46 +02:00
Daniel Veillard
46b80ce25e Merge branch 'tmp' 2009-09-07 16:48:03 +02:00
Matthias Bolte
166c03f31b Some close/fclose/closedir calls are missing
* src/openvz_conf.c src/qemu_driver.c src/storage_backend_scsi.c
  src/xen_inotify.c: closes various file descriptors leaks
2009-09-07 16:47:13 +02:00
Jim Meyering
3ef2e05c4d lxc_container.c: avoid a leak on error paths
* src/lxc_container.c (lxcContainerMountBasicFS): Don't leak upon failure.
Add "cleanup:" label and change each post-allocation failure to
use "goto cleanup" rather than returning immediately.
2009-09-04 18:59:29 +02:00
Jim Meyering
1469bcf6c5 qemu_conf.c: add a comment suggesting why we leave a dead-store
* src/qemu_conf.c (qemuBuildHostNetStr): Do not remove the type_sep=','
dead store, since not having it would be a problem if we ever add a
new attribute=VAL option.
2009-09-04 18:59:29 +02:00
Jim Meyering
767c5bbe01 hash.c: remove a dead store
* src/hash.c (virHashFree): Remove useless assignment to inside_table.
2009-09-04 18:59:29 +02:00
Jim Meyering
f2a46c848c interface_conf.c: remove a dead-store and declaration
* src/interface_conf.c (virInterfaceDefParseDhcp): Remove unused "old".
2009-09-04 18:59:29 +02:00
Jim Meyering
25b20b7103 eventtest.c: detect write failure and avoid dead stores
* tests/eventtest.c (mymain): Exit nonzero upon write failure.
This also avoids several dead stores of the form ret = safewrite...
2009-09-04 18:59:29 +02:00
Jim Meyering
198bd0516a openvz_conf.c: Remove dead store to copy_fd
* src/openvz_conf.c (openvz_copyfile): Remove unused assignment.
2009-09-04 18:59:29 +02:00
Jim Meyering
f4d881649a storage_backend_logical.c: appease clang: remove useless increment
* src/storage_backend_logical.c (virStorageBackendLogicalBuildPool):
Don't increment "n" when we won't use the result.
2009-09-04 18:59:29 +02:00
Matthias Bolte
d5df676938 ESX raise error if UUID parse failed
* src/esx/esx_util.c: let esxUtil_GetConfigUUID() report an error if
  virUUIDParse() fails
2009-09-04 18:32:44 +02:00
Matthias Bolte
ad866fd196 ESX add domain undefine based on esxVI_UnregisterVM
* src/esx/esx_driver.c: add esxDomainUndefine() based on
  esxVI_UnregisterVM()
* src/esx/esx_vi_methods.[ch]: add esxVI_UnregisterVM()
2009-09-04 18:30:10 +02:00
Matthias Bolte
3e8cb46076 ESX add esxGetCapabilities() with basic defaults
* src/esx/esx_driver.c: add esxCapsInit() with default caps and add
  esxGetCapabilities()
2009-09-04 18:25:27 +02:00
Matthias Bolte
46e76e8b2b ESX simplify SOAP request and response handling
* src/esx/esx_vi.[ch]: convert esxVI_RemoteRequest_Execute() to a
  simpler esxVI_Context_Execute() version, remove esxVI_RemoteRequest
  and convert esxVI_RemoteResponse to esxVI_Response
* src/esx/esx_vi_methods.c: update and simplify callers to use
  esxVI_Context_Execute() instead of esxVI_RemoteRequest_Execute()
2009-09-04 18:24:25 +02:00
Matthias Bolte
03d28d7355 ESX use virXPathNode*() to simplify XPath handling
* src/esx/esx_vi.[ch]: use virXPathNode*() in
  esxVI_RemoteRequest_Execute() and remove
  esxVI_RemoteResponse_DeserializeXPathObject*()
* src/esx/esx_vi_methods.c: update callers to use the new syntax of
  esxVI_RemoteRequest_Execute()
2009-09-04 18:08:52 +02:00
Matthias Bolte
1f8988b580 ESX: make esxVI_GetVirtualMachineIdentity() robust
* src/esx/esx_driver.c: add configStatus to the requested properties
  to check it in esxVI_GetVirtualMachineIdentity()
* src/esx/esx_vi.[ch]: add esxVI_GetManagedEntityStatus()
  and use it in esxVI_GetVirtualMachineIdentity()
* src/esx/esx_vi_types.[ch]: add VI type esxVI_ManagedEntityStatus
2009-09-04 18:03:22 +02:00
Matthias Bolte
902aaabb11 ESX: Fix VMX path parsing and URL encoding
* src/esx/esx_driver.c: handle spaces in VMX file path and use a
  virBuffer to encode spaces correctly in the resulting URL
* src/esx/esx_vi.c: include the URL in the error message in case
  of a download error
2009-09-04 17:55:55 +02:00
Pritesh Kothari
6b50bbea00 VBox add Storage Volume support
* src/vbox/vbox_driver.c src/vbox/vbox_tmpl.c: adds the driver for
  storage volumes
2009-09-04 16:28:52 +02:00
Ryota Ozaki
0cf672fa91 Fix several memory leaks
* src/domain_conf.c src/network_conf.c src/qemu_conf.c
  src/storage_backend_fs.c: various problems spotted by valgrind
  through libvirt code
2009-09-04 15:56:32 +02:00
Pritesh Kothari
c8376c91f6 VBox driver cleanups
* src/vbox/vbox_tmpl.c: a bit of cleanup
2009-09-04 15:44:59 +02:00
Laine Stump
28c3243e77 Minor comment changes
* src/libvirt.c: fix some minor grammer (and one other) nits in comments
  that end up in generated API reference documentation
2009-09-04 15:40:52 +02:00
Laine Stump
3ced80b54a Fix a memory leak in virsh
* src/virsh.c: cmdNodeDeviceDumpXML wasn't freeing
  virNodeDeviceGetXMLDesc() return string
2009-09-04 15:38:15 +02:00
Daniel P. Berrange
96f0ee85d2 Fix ID field in virDomainPtr after starting Xen VM
* src/xend_internal.c: Lookup guest after starting persistent
  config in order to refresh the domain ID field
2009-09-04 14:10:44 +02:00
Daniel Veillard
91c7bf659b PHYP driver cleanups
* libvirt.spec.in: activate phyp and fix the BuildDep to libssh2-devel
* src/phyp/phyp_driver.c: fix a debug macro to use the normal logging API
2009-09-04 14:03:45 +02:00