Jim Meyering
56a3cb8086
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.
2008-03-27 13:45:26 +00:00
Jim Meyering
513bd04ce1
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.
2008-03-27 13:43:01 +00:00
Richard W.M. Jones
92a1e14b0b
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).
2008-02-27 16:14:44 +00:00
Richard W.M. Jones
242fe3d401
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).
2008-02-26 18:31:57 +00:00
Daniel P. Berrange
f43e709842
Added convenience virsh command for creating pools/volumes without XML
2008-02-20 15:29:13 +00:00
Jim Meyering
e8ff93b4e6
Remove more useless if tests before "free"-like functions.
...
* build-aux/useless-if-before-free: Rename from ...
* build-aux/find-unnecessary-if-before-free: ... this. Remove file.
Also changed it so that new names are no longer hard-coded in the
script. Instead, they're supplied via options:
* Makefile.cfg (useless_free_options): Define.
Add xmlXPathFreeObject to the list of free-like functions it detects.
* Makefile.maint (sc_avoid_if_before_free): Reflect script renaming.
* .x-sc_avoid_if_before_free: Likewise.
* src/openvz_conf.c (openvzParseXML): Remove useless "if"-before-free.
* src/qemu_conf.c (qemudParseXML, qemudParseNetworkXML): Likewise.
* src/virsh.c (cmdVNCDisplay, cmdTTYConsole, cmdDetachInterface):
(cmdDetachDisk): Likewise.
* src/xm_internal.c (xenXMConfigSetIntFromXPath): Likewise.
(xenXMConfigSetStringFromXPath, xenXMParseXMLToConfig): Likewise.
(xenXMDomainAttachDevice, xenXMAttachDisk, xenXMAttachInterface):
(xenXMDomainDetachDevice): Likewise.
* src/xml.c (virXPathString): Likewise.
* tests/xmlrpctest.c (checkRequestValue): Likewise.
2008-02-07 16:49:29 +00:00
Jim Meyering
5a93214143
Remove trailing blanks
2008-02-07 12:34:19 +00:00
Mark McLoughlin
f90cd4c3f4
src/xm_internal.[ch]: Move static function prototype from header
2008-02-07 10:14:43 +00:00
Daniel Veillard
594af3eb22
add/change/delete a Disk/NIC of an inactive domains
...
* src/xm_internal.[ch]: applied patch from Shigeki Sakamoto to
add/change/delete a Disk/NIC of an inactive domains
Daniel
2008-02-06 17:57:10 +00:00
Jim Meyering
e04912a9f0
Remove all trailing blanks; turn on the rule to detect them.
...
* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
* .x-sc_trailing_blank: New file, to exempt the few binary files.
2008-02-05 19:27:37 +00:00
Jim Meyering
fb66d5ab92
Eliminate all uses of virBufferAdd with string literals.
...
* Makefile.maint (sc_prohibit_virBufferAdd_with_string_literal):
New rule.
* src/buf.h (virBufferAddLit): Define.
* src/conf.c (virConfSaveValue): Use virBufferAddLit, in place
of virBufferAdd everywhere possible.
(virConfSaveEntry): Likewise.
* src/qemu_conf.c (qemudGenerateXML, qemudGenerateNetworkXML): Likewise.
* src/qemu_driver.c (qemudGetFeatures, qemudGetCapabilities): Likewise.
* src/test.c (testDomainDumpXML, testNetworkDumpXML): Likewise.
* src/xen_internal.c (xenHypervisorMakeCapabilitiesXML): Likewise.
* src/xend_internal.c (xend_parse_sexp_desc_os): Likewise.
(xend_parse_sexp_desc, sexpr_to_xend_topology_xml): Likewise.
* src/xm_internal.c (xenXMDomainFormatXML, xenXMDomainPinVcpu): Likewise.
* src/xml.c (virSaveCpuSet, virParseXenCpuTopology): Likewise.
(virDomainParseXMLGraphicsDescImage): Likewise.
(virDomainParseXMLGraphicsDescVFB, virDomainParseXMLOSDescHVM): Likewise.
(virDomainParseXMLOSDescPV, virDomainParseXMLDiskDesc): Likewise.
(virDomainParseXMLIfDesc, virDomainParseXMLDesc): Likewise.
2008-02-05 14:22:28 +00:00
Jim Meyering
2367caa327
Also detect and remove unnecessary if-before-xmlXPathFreeContext.
...
* build-aux/find-unnecessary-if-before-free: Update regexp.
* src/openvz_conf.c: Remove unnecessary "if (P)"-before xmlXPathFreeContext.
* src/qemu_conf.c: Likewise.
* src/virsh.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* tests/xmlrpctest.c: Likewise.
2008-01-29 18:23:43 +00:00
Jim Meyering
a378188194
Enable the <config.h>-requiring test; fix violations
...
Use <config.h>, not "config.h", per autoconf documentation.
* Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
* .x-sc_require_config_h: New file, to list exempted files.
* Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
2008-01-29 18:15:54 +00:00
Jim Meyering
acff2d11ac
Given code like if (foo) free (foo); remove the useless "if (foo) " part.
...
Likewise, given if (foo != NULL) free (foo); remove the useless "if" test.
* proxy/libvirt_proxy.c: Remove unnecessary "if" test before free.
* python/generator.py: Likewise.
* qemud/qemud.c: Likewise.
* src/buf.c: Likewise.
* src/conf.c: Likewise.
* src/hash.c: Likewise.
* src/iptables.c: Likewise.
* src/libvirt.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/qemu_conf.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/remote_internal.c: Likewise.
* src/test.c: Likewise.
* src/virsh.c: Likewise.
* src/virterror.c: Likewise.
* src/xen_internal.c: Likewise.
* src/xen_unified.c: Likewise.
* src/xend_internal.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* src/xmlrpc.c: Likewise.
* src/xs_internal.c: Likewise.
* tests/testutils.c: Likewise.
* tests/xencapstest.c: Likewise.
* tests/xmconfigtest.c: Likewise.
2008-01-29 17:41:07 +00:00
Daniel Veillard
5912e7c233
Preserve vif order
...
* src/xml-internal.c: apply patch from Hiroyuki Kaguchi to
preserve the vif list order.
Daniel
2008-01-21 08:27:12 +00:00
Daniel Veillard
cc8e4ff318
fix setting CPU parameters in the config files
...
* src/xm_internal.c: patch from Saori Fukuta to fix setting
CPU parameters in the config files, the value was overwritten
Daniel
2007-12-14 15:51:42 +00:00
Jim Meyering
49230350fa
Use a variable name as sizeof argument, not a type name.
...
Given code like: T *var = calloc (n, sizeof (T));
Convert to this: T *var = calloc (n, sizeof (*var));
This first-cut change adjusts all malloc, calloc, and
realloc statements.
The only binary differences are in remote_internal.c
(due to the bug fix) and in xmlrpc.c (due to factorization).
* python/libvir.c: As above.
* qemud/event.c: Likewise.
* qemud/mdns.c: Likewise.
* qemud/qemud.c: Likewise.
* qemud/remote.c: Likewise.
* src/bridge.c: Likewise.
* src/buf.c: Likewise.
* src/conf.c: Likewise.
* src/hash.c: Likewise.
* src/iptables.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/qemu_conf.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/test.c: Likewise.
* src/xen_internal.c: Likewise.
* src/xen_unified.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* tests/qemuxml2argvtest.c: Likewise.
* src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
* src/remote_internal.c (remoteAuthMakeCredentials): Use the right
type when allocating space for an array of cred _pointers_.
2007-12-11 21:57:29 +00:00
Jim Meyering
4a2f8fc633
Include "config.h" in remaining non-generated files.
...
* proxy/libvirt_proxy.c: Likewise.
* python/libvir.c: Likewise.
* python/types.c: Likewise.
* src/event.c: Likewise.
* src/xm_internal.c: Likewise.
* tests/reconnect.c: Likewise.
* tests/testutils.c: Likewise.
2007-12-07 10:08:06 +00:00
Daniel P. Berrange
7fa9ceb740
Added public API for authentication credential callback support
2007-12-05 18:28:05 +00:00
Daniel Veillard
ed5e20baab
* src/xen_unified.[ch] src/proxy_internal.c src/xen_internal.c
...
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
cleanup the xen subdriver table, remove the type entry and
always return "Xen" from the unified entry point.
Daniel
2007-12-03 09:34:38 +00:00
Richard W.M. Jones
208a450a53
Wed Nov 28 09:00:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/xm_internal.c, src/xm_internal.h: Added support for
pinning inactive domains for Xen 3.0.3 (Saori Fukuta).
2007-11-28 10:11:18 +00:00
Daniel Veillard
1ad3d2cdd8
* src/xm_internal.c: fix the parsing of predefined domains on
...
xen prior to 3.1 to take into accound the fact that disk can
be shareable.
Daniel
2007-11-21 16:31:30 +00:00
Daniel Veillard
61b113c623
Cleaned up a couple of comments/tests, Daniel
2007-11-20 18:57:41 +00:00
Daniel Veillard
aab34d876e
* include/libvirt/virterror.h src/openvz_conf.c src/openvz_driver.c
...
src/stats_linux.c src/virterror.c src/xm_internal.c: patch from
Saori Fukuta cleaning up various problems in the error reporting
layers
Daniel
2007-11-20 10:15:38 +00:00
Richard W.M. Jones
88f28d6980
Wed Nov 14 11:36:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/libvirt.c and all internal driver interfaces: Parse the
URI only once and pass it to virDrvOpen instead of the
unparsed name string.
2007-11-14 11:40:57 +00:00
Daniel Veillard
c33b54df47
* src/xm_internal.c: patches from Masayuki Sunou to fix a problem
...
when an HVM domain is started with a CD-Rom config, this should
fix #328841
Daniel
2007-11-01 13:33:58 +00:00
Daniel Veillard
390cca8125
* proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xen_internal.c
...
src/xen_unified.[ch] src/xend_internal.[ch] src/xml.[ch]: last
patch for the library NUMA support, allow to serialize CPU pinning
to domain configs (but won't work though proxy access), includes
many patches from Saori Fukuta.
Daniel
2007-10-31 09:39:13 +00:00
Daniel P. Berrange
175e1711a6
Fixed processing of vncdisplay/vncused params in XM config files
2007-10-10 17:55:38 +00:00
Daniel P. Berrange
bf70fe4883
Fix virtual networking XML -> XM config file conversion & a mem leak
2007-10-10 17:41:06 +00:00
Daniel P. Berrange
46b433f069
Cleanup UUID apis & constants
2007-08-09 20:19:12 +00:00
Daniel P. Berrange
f029721d2b
Added support for input devices
2007-07-18 21:08:22 +00:00
Daniel P. Berrange
67c346b102
Added new <clock/> element in XML for choosing utc/localtime
2007-07-16 21:30:30 +00:00
Daniel Veillard
b36f453a58
* src/xm_internal.c src/xend_internal.c src/buf.[ch]: add
...
new function virBufferEscapeString() to format a string while
escaping its content for XML, and apply it to a couple of
obvious places, should fix bug #206653
* po/*: updated strings, and added new bosnian localization.
Daniel
2007-07-09 11:24:52 +00:00
Richard W.M. Jones
4ea0ef797f
Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/proxy_internal.c, src/proxy_internal.h,
src.xen_internal.c, src/xen_internal.h,
src/xen_unified.c, src/xen_unified.h,
src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h,
src/xs_internal.c, src/xs_internal.h: The interface
between xen_unified.c and its underlying driver now uses
a custom structure (struct xenUnifiedDriver) instead
of reusing virDriver.
* src/xen_unified.c: virDomainLookup* functions in Xen
now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
* src/xs_internal.c: Fix indentation.
2007-07-06 15:11:22 +00:00
Richard W.M. Jones
6113d4e17d
Wed Jul 4 14:17:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/xm_internal.c: configCache not getting refilled if the
connection was closed (affected the remote case mainly),
and error messages added to xenXMConfigCacheRefresh.
2007-07-04 13:16:57 +00:00
Daniel P. Berrange
2f02d292da
Move virBuffer functions into src/buf.c,h
2007-06-26 22:33:22 +00:00
Richard W.M. Jones
2be812bbc9
Tue Jun 26 12:40:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* include/libvirt/libvirt.h.in, src/libvirt.c: (and numerous
other files) Added support for virConnectGetHostname
and virConnectGetURI calls.
2007-06-26 11:42:46 +00:00
Richard W.M. Jones
6668e64766
Fri Jun 15 16:21:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* configure.in: Solaris header file fixes (Mark Johnson).
2007-06-15 15:24:20 +00:00
Richard W.M. Jones
a770b4c357
Fri Jun 15 14:42:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/test.c, src/virsh.c, src/xend_internal.c, src/xm_internal.c:
Replace calls to deprecated {,r}index with str{,r}chr.
2007-06-15 13:44:19 +00:00
Daniel P. Berrange
f404609120
Fixed handling of bridge devices
2007-06-07 18:21:58 +00:00
Daniel P. Berrange
de288e8dbc
Fix boot device tests
2007-06-07 14:08:35 +00:00
Daniel Veillard
a80faa4bf0
* src/xend_internal.c src/xm_internal.c src/xml.c: add support
...
for arguments to bootloader, patch from Hugh Brock
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml: add specific
regression tests
Daniel
2007-06-07 13:50:18 +00:00
Daniel Veillard
652f3bb13b
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
...
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/qemu_internal.c src/test.c
src/virsh.c src/xen_internal.c src/xen_internal.h src/xen_unified.c
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
Applied patches from Atsushi SAKAI to add the scheduler API,
with patch from Rich Jones for error handing, and a number
of cleanups and more error checking from me
Daniel
2007-06-05 12:06:08 +00:00
Daniel P. Berrange
3b0acf5616
Allow overwrite of existing guest config
2007-05-22 00:39:59 +00:00
Daniel P. Berrange
ac2d00c498
Fix <boot> syntax
2007-05-11 14:24:02 +00:00
Richard W.M. Jones
18cd1a1e57
Wed Apr 4 15:18:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/xen_unified.c et al: Unified Xen driver. Architecture
described here:
https://www.redhat.com/archives/libvir-list/2007-March/msg00396.html
2007-04-04 14:19:49 +00:00
Daniel Veillard
fb624fbecf
* qemud/iptables.c qemud/qemud.c src/conf.c src/hash.c src/libvirt.c
...
src/virsh.c src/xm_internal.c: change malloc/memset(0) pairs to
using calloc()
Daniel
2007-03-22 18:30:57 +00:00
Daniel Veillard
9e170a88cd
* qemud/conf.c qemud/driver.h qemud/internal.h src/internal.h
...
src/sexpr.h src/test.c src/xm_internal.c src/xml.c src/xml.h:
applied patch from Richard Jones adding check to printf-like
functions and fixing the problems raised
Daniel
2007-03-16 15:03:21 +00:00
Daniel Veillard
635ae38979
* include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
...
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
qemud/dispatch.c qemud/internal.h qemud/protocol.h
src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
src/test.c src/virsh.c src/virterror.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xm_internal.c
src/xml.h src/xs_internal.c: applied patch from Richard Jones
adding virConnectGetCapabilities(), plus various small little
fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
2007-03-15 17:24:56 +00:00
Daniel Veillard
181ce1fdc6
* configure.in proxy/Makefile.am proxy/libvirt_proxy.c
...
src/Makefile.am src/libvirt.c src/qemu_internal.c src/test.c
src/xen_internal.c src/xen_internal.h src/xend_internal.c
src/xm_internal.c src/xml.c src/xs_internal.c
tests/Makefile.am tests/sexpr2xmltest.c tests/xmconfigtest.c:
allow selective compilation of Xen,QEmu/KVM and test support
in or out at configure time. Also allows to compile on a system
without Xen development installed. All drivers are selected by
default.
Daniel
2007-03-15 07:43:16 +00:00