John Levon
003f354917
xenstore: Use virMacAddrCompare() for case-insensitive comparison
2009-02-05 18:14:00 +00:00
Daniel P. Berrange
1c64dc76c1
Misc xen driver bug/crash fixes
2009-01-29 23:01:37 +00:00
Jim Meyering
bc18a91f91
error-reporting calls using VIR_ERR_NO_MEMORY: use virReportOOMError instead
...
* src/uml_conf.c (VIR_FROM_THIS): Define to VIR_FROM_UML.
* src/xs_internal.c (VIR_FROM_THIS): Define to VIR_FROM_XEN.
* src/xml.c (VIR_FROM_THIS): Define to VIR_FROM_XML.
* src/stats_linux.c (VIR_FROM_THIS): Define to VIR_FROM_STATS_LINUX.
* src/datatypes.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
* src/lxc_conf.c (VIR_FROM_THIS): Define to VIR_FROM_LXC.
* src/libvirt.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
* src/node_device_conf.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV.
* src/openvz_conf.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ.
* src/openvz_driver.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ.
* src/conf.c (VIR_FROM_THIS): Define to VIR_FROM_CONF.
Note: this loses config_filename:config_lineno diagnostics,
but that's ok.
* src/node_device.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV.
* src/sexpr.c (VIR_FROM_THIS): Define to VIR_FROM_SEXPR.
* po/POTFILES.in: remove src/sexpr.c and src/lxc_conf.c
2009-01-29 12:10:32 +00:00
John Levon
39e49ad7c9
fix recursive lock hang in xenstore driver
2009-01-23 19:18:24 +00:00
John Levon
2b29698352
Least privilege support for Solaris
2009-01-22 17:49:41 +00:00
Daniel P. Berrange
e52d74e536
Make xen driver threadsafe
2009-01-21 18:11:14 +00:00
Daniel P. Berrange
e428a69e6f
Remove use of static data in Xen inotify driver
2009-01-20 17:19:23 +00:00
John Levon
406c05f2e7
Fix xs_unwatch() to correctly pass the token
2009-01-15 01:23:32 +00:00
John Levon
c8070bf632
Fix activeDomainList handling
2009-01-15 01:21:36 +00:00
Daniel P. Berrange
0604e9efe0
Fix __sun macro check (John Levon)
2008-12-17 21:31:51 +00:00
Daniel P. Berrange
e5fc0aad31
Fix return type for Xen open subdriver method impl (John Levon)
2008-12-17 21:26:16 +00:00
Daniel P. Berrange
bc898df2c7
QEMU domain event thread safety
2008-12-04 21:09:20 +00:00
Daniel P. Berrange
1eeceaa649
Support domain lifecycle events for Xen (Ben Guthro & Daniel Berrange)
2008-11-25 10:44:52 +00:00
Daniel P. Berrange
618276de19
Push URI probing logic down into individual drivers
2008-11-17 11:44:51 +00:00
Daniel P. Berrange
6ace5a39c3
Move some API declarations out of internal.h & hash.c into dedicated files
2008-11-04 23:22:06 +00:00
Daniel P. Berrange
d714b2afae
Move internal error APIs into virterror_internal.h & drop leading __ prefix
2008-11-04 22:30:33 +00:00
Jim Meyering
fd52c6ff67
avoid many format string warnings
...
Building with --disable-nls exposed many new warnings like these:
virsh.c:4952: warning: format not a string literal and no format ...
util.c:163: warning: format not a string literal and no format arguments
All but one of the following changes add a "%s" argument before
the offending _(...) argument.
This was the only manual change:
* src/lxc_driver.c (lxcVersion): Use %s and strerror(errno)
rather than %m, to avoid a warning from gcc -Wformat-security.
Add "%s" before each warned about format-string-with-no-%-directive:
* src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML)
(virDomainDefParseString, virDomainDefParseFile):
* src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain)
(__virGetNetwork, virReleaseNetwork, __virGetStoragePool)
(virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol):
* src/lxc_container.c (lxcContainerChild):
* src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine)
(lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML)
(lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart)
(lxcVersion, lxcGetSchedulerParameters):
* src/network_conf.c (virNetworkDefParseString)
(virNetworkDefParseFile):
* src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains):
* src/openvz_driver.c (openvzDomainDefineCmd)
(openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown)
(openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML)
(openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine)
(openvzDomainSetAutostart, openvzDomainGetAutostart)
(openvzDomainSetVcpus):
* src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek):
* src/remote_internal.c (remoteDomainBlockPeek)
(remoteDomainMemoryPeek, remoteAuthPolkit):
* src/sexpr.c (sexpr_new, _string2sexpr):
* src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol)
(virStorageBackendDiskCreateVol):
* src/storage_backend_fs.c
(virStorageBackendFileSystemNetFindPoolSources):
* src/storage_backend_logical.c (virStorageBackendLogicalFindLVs)
(virStorageBackendLogicalFindPoolSources):
* src/test.c (testOpenDefault, testOpenFromFile, testOpen)
(testGetDomainInfo, testDomainRestore)
(testNodeGetCellsFreeMemory):
* src/util.c (virExec):
* src/virsh.c (cmdAttachDevice, cmdDetachDevice)
(cmdAttachInterface, cmdDetachInterface, cmdAttachDisk)
(cmdDetachDisk, cmdEdit):
* src/xend_internal.c (do_connect, wr_sync, xend_op_ext)
(urlencode, xenDaemonDomainCreateXML)
(xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID)
(xenDaemonParseSxprOS, xend_parse_sexp_desc_char)
(xenDaemonParseSxprChar, xenDaemonParseSxprDisks)
(xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain)
(xenDaemonDomainFetch, xenDaemonDomainGetAutostart)
(xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform)
(xenDaemonDomainDefineXML, xenDaemonGetSchedulerType)
(xenDaemonGetSchedulerParameters)
(xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek)
(xenDaemonFormatSxprChr, virDomainXMLDevID):
* src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu)
(xenXMDomainCreate, xenXMDomainDefineXML)
(xenXMDomainAttachDevice, xenXMDomainDetachDevice):
* src/xml.c (virXPathString, virXPathNumber, virXPathLong)
(virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet):
* src/xs_internal.c (xenStoreOpen):
2008-10-13 16:46:28 +00:00
Daniel Veillard
f6803c960f
virDomainDefineXML, and a few additional cleanups
...
* include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
qemud/remote* src/driver.h src/libvirt.c src/libvirt_sym.version
src/lxc_driver.c src/openvz_driver.c src/proxy_internal.c
src/qemu_driver.c src/remote_internal.c src/test.c src/virsh.c
src/xen_internal.c src/xen_unified.c src/xen_unified.h
src/xend_internal.c src/xend_internal.h src/xm_internal.c
src/xs_internal.c docs/*: cleanup virDomainCreateLinux into
virDomainDefineXML, and a few additional cleanups
Daniel
2008-10-10 09:32:27 +00:00
Cole Robinson
02fc93d624
Centralize majority of error reporting logic.
2008-10-09 15:38:31 +00:00
Daniel Veillard
584ff19452
* src/xend_internal.c src/xs_internal.c: use poweroff instead of halt
...
when shutting down a xen domain, patch by John Levon
Daniel
2008-09-04 09:07:42 +00:00
Daniel P. Berrange
bb16f4a25d
Do conditional driver config in Makefile.am, not source files
2008-08-20 20:48:35 +00:00
Daniel P. Berrange
d9383fe158
Remove unused/no-op Xen driver code
2008-07-25 09:51:23 +00:00
Daniel P. Berrange
a211db1b8f
Fix typo in domain state constant
2008-07-08 17:49:26 +00:00
Jim Meyering
5bf824ea10
convert TAB-based indentation in C sources to use only spaces
...
Done using this command (also includes .c.in and .h.in files):
for i in $(g ls-files|grep -E '\.[ch](\.in)?$'|grep -v gnulib); do
expand -i $i > j && mv j $i;done
2008-04-10 16:54:54 +00:00
Jim Meyering
dc42a9d2de
remove Vim and Emacs variable settings from C source files
...
Done with these commands:
git grep -l Local.variab|xargs \
perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,'
git grep -l Local.variab|xargs \
perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
2008-04-10 16:53:29 +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
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 P. Berrange
97bed42f7a
Fix & refactor ref counting cleanup code
2008-01-21 16:29:10 +00:00
Daniel Veillard
81acc14e3a
fix the detach-disk command when using Xen tap devices
...
* src/xs_internal.[ch]: patch from Saori Fukuta to fix the
detach-disk command when using Xen tap devices.
* docs/libvir.html: typo fix from Jim Meyering
Daniel
2007-12-14 15:38:02 +00:00
Jim Meyering
87396257fc
Include "config.h".
...
* qemud/event.c: Likewise.
* src/buf.c: Likewise.
* src/hash.c: Likewise.
* src/nodeinfo.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/proxy_internal.c: Likewise.
* src/virterror.c: Likewise.
* src/xmlrpc.c: Likewise.
* src/xs_internal.c: Likewise.
* tests/conftest.c: Likewise.
* tests/xmlrpctest.c: Likewise.
This fixes a mingw build failure reported by Rich Jones.
Author: Jim Meyering <meyering@redhat.com>
2007-12-05 21:40:15 +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
Daniel Veillard
1338ed4f25
* configure.in: when configuring with --prefix=/usr i.e. the same
...
prefix as the installed libvirt, use the same localstatedir /var
(instead of /usr/var) and sysconfdir /etc (instead of /usr/etc) to
be able to connect to the system daemon, and use the system local
options
* src/xs_internal.c: avoid error message when non-root cannot open
xenstore
* src/xend_internal.c: avoid error message when non-root cannot
directly access xend, in those 2 cases the proxy (or remote code)
should implement the access so there is no need to raise the error
there.
Daniel
2007-11-27 14:39:42 +00:00
Daniel Veillard
61b113c623
Cleaned up a couple of comments/tests, Daniel
2007-11-20 18:57:41 +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
a500a479b0
Begin fixing uses of strtol: parse integers more carefully.
...
Patch from Jim Meyering
* src/internal.h: Include <errno.h>.
Define new static inline function, xstrtol_i.
* src/virsh.c: Detect integer overflow in domain ID number
in vshCommandOptDomainBy. Detect overflow and invalid port
number suffix in cmdVNCDisplay.
* src/xend_internal.c: Parse CPU number more carefully in
xenDaemonDomainGetVcpus.
* tests/int-overflow: New script. Test for the above-fixed bug.
* tests/Makefile.am: Add int-overflow to TESTS. Define
TESTS_ENVIRONMENT, to propagate $abs_top_* variables into the
int-overflow script. Adapt the "valgrind" rule not to clobber
new TESTS_ENVIRONMENT.
Daniel
2007-11-12 14:00:32 +00:00
Daniel Veillard
f2886d75e6
* src/xs_internals.c: patch from Chris Lalancette, forgot to
...
remove the domainDumpXML entry when changing the driver structure
Daniel
2007-11-06 16:25:32 +00:00
Daniel Veillard
9899932303
* src/xml.c src/xs_internal.c src/xs_internal.h: applied patch
...
from Masayuki Sunou to fix xend errors when adding disk
devices, due to improper device id lookup.
Daniel
2007-11-06 11:49:01 +00:00
Daniel P. Berrange
0e7aa57385
Solaris hypercall compatability fixes (Mark Johnson)
2007-09-29 18:37:47 +00:00
Daniel Veillard
3a4c8d219c
* src/xs_internal.c: cleanup of memory leaks from Masayuki Sunou
...
* src/virsh.c: another memory leaks of virsh schedinfo cleanup from
Saori Fukuta
* po/*: string localization merge/update
Daniel
2007-08-21 11:53:52 +00:00
Daniel P. Berrange
9112a139df
Speed up impl of lookupbyid/uuid and getostype for Xen by using HV where available
2007-08-10 18:25:15 +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
16eae80edf
Fri Jul 6 16:00:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/hash.c, src/internal.h: Remove virGetDomainByID function
as it is not used or exported.
* src/proxy_internal.c, src/qemu_driver.c, src/remote_internal.c,
src/test.c, src/xend_internal.c, src/xs_internal.c: Fix
all callers to virGetDomain and virGetNetwork functions -
the callers do not need to set virterror since it is already
set inside the functions.
2007-07-06 15:02:09 +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
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
Richard W.M. Jones
e0e95c53fc
Tue May 8 11:14:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/hash.c, src/internal.h, src/xs_internal.c: Remove
unused fields from internal _virDomain structure.
2007-05-08 10:22:36 +00:00
Richard W.M. Jones
b15d511db4
Wed May 2 18:38:00 BST 2007 Richard Jones <rjones@redhat.com>
...
* src/proxy_internal.c, src/qemu_internal.c, src/test.c,
src/xen_unified.c, src/xend_internal.c, src/xs_internal.c:
During virConnectOpen, be careful to call __virRaiseError
with conn = NULL so that the error message is not
discarded.
2007-05-02 17:36:25 +00:00
Richard W.M. Jones
94033dd73f
Mon Apr 30 18:33:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
...
* src/libvirt.c, src/driver.h, src/proxy_internal.c,
src/qemu_internal.c, src/test.c, src/xen_internal.c,
src/xend_internal.c, src/xs_internal.c,
proxy/libvirt_proxy.c: Remove VIR_DRV_OPEN_QUIET.
2007-04-30 17:30:11 +00:00
Daniel P. Berrange
42ee7111c3
Fixed up various functions for Xen 3.0.5
2007-04-13 00:43:57 +00:00