Jim Meyering
64b72210ad
Work around 'virGetVersion' build problem
...
The 'getVer' fix introducted in d88d459d
[Allow remote://hostname/
style URIs for automatic driver probe...] breaks compiling libvirt
with loadable module support. Work around this to get it building again.
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2009-02-17 10:33:41 +00:00
Jim Meyering
cedc15019e
avoid compiler warning about unused parameter
...
* src/bridge.c (brProbeVnetHdr)
[IFF_VNET_HDR && TUNGETFEATURES && TUNGETIFF]: Use a "(void)" case
to mark the parameter as unused. Reported by Maximilian Wilhelm in
http://thread.gmane.org/gmane.comp.emulators.libvirt/11918/focus=11917
2009-02-17 10:26:43 +00:00
Jim Meyering
6b4b4eb29c
don't fail daemon-conf test when configured --without-qemu
...
* tests/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
* tests/daemon-conf: Use test-lib.sh.
Skip this test when configured --without-qemu.
2009-02-17 10:23:48 +00:00
Jim Meyering
bdd5094d8f
accommodate configuring --without-lxc --without-qemu
...
* configure.in: Enable internal WITH_BRIDGE support not just for LXC or
QEMU, but also for --with-network. Russell Haering reported that
compilation failed when configured with --without-lxc --without-qemu.
Details: http://thread.gmane.org/gmane.comp.emulators.libvirt/11928
* src/bridge.h: Use #if WITH_BRIDGE, rather than currently-equivalent
"#if defined(WITH_QEMU) || defined(WITH_LXC)"
2009-02-17 10:23:19 +00:00
Jim Meyering
a16ee2c83b
doc: fix typo in formatdomain's clock offset specification
...
* docs/formatdomain.html.in: s/clock sync/clock offset/
Patch by Jesse Lauren Farinacci <jieryn@gmail.com>.
2009-02-17 10:19:40 +00:00
Daniel P. Berrange
4dce547640
Fix I/O errors in libvirtd daemon, and hang/crash in remote client upon I/O error
2009-02-17 09:44:18 +00:00
Cole Robinson
3a53ab7913
Unbreak virsh *-edit commands: Don't pass unexpected flags to DumpXML
2009-02-16 22:51:31 +00:00
Cole Robinson
c482439232
Remove erroneous lvm volume format check for backing store.
2009-02-16 22:47:19 +00:00
Cole Robinson
a3d1fb9cf3
Fix building python bindings: Skip bindings for virSaveLastError and
...
virFreeError
2009-02-16 22:44:49 +00:00
Mark McLoughlin
0bb6f816e3
Add virFileWriteStr()
...
Re-factor the code from networkEnableIpForwarding() into a
utility function in preparation for code which writes to
sysfs files.
2009-02-13 19:13:06 +00:00
Mark McLoughlin
f6a5e8f785
Fix some error strings in xml.c
...
Just some copy-and-paste mixups.
2009-02-13 19:12:45 +00:00
Mark McLoughlin
c4602255c7
virXPathInt() and virXPathUInt() don't exist
...
It looks like these functions have never existed.
2009-02-13 19:12:20 +00:00
Mark McLoughlin
62e45f57b4
Fix bugzilla link in virsh man page
...
Note, I haven't generated a new virsh.1 because Pod::Man 2.16
gives a bunch of warnings even with the existing version.
2009-02-13 19:11:59 +00:00
Mark McLoughlin
6d69d5eac3
Fix libvirt_proxy.c warnings from gcc-4.4
...
libvirt_proxy.c: In function 'proxyReadClientSocket':
libvirt_proxy.c:659: error: dereferencing pointer 'req' does break strict-aliasing rules
libvirt_proxy.c:657: error: dereferencing pointer 'req' does break strict-aliasing rules
libvirt_proxy.c:655: error: dereferencing pointer 'req' does break strict-aliasing rules
...
2009-02-13 19:11:37 +00:00
Mark McLoughlin
9fec27be49
Fix bridge.c warnings with gcc-4.4
...
bridge.c: In function 'brSetInetAddr':
bridge.c:665: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules
bridge.c:665: note: initialized from here
bridge.c:666: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules
bridge.c:666: note: initialized from here
Fix qemud.c warnings with gcc-4.4
qemud.c: In function ‘remoteListenTCP’:
qemud.c:675: error: dereferencing pointer ‘sa.72’ does break strict-aliasing rules
qemud.c:675: note: initialized from here
qemud.c:678: error: dereferencing pointer ‘sa.73’ does break strict-aliasing rules
qemud.c:678: note: initialized from here
2009-02-13 19:10:55 +00:00
John Levon
7d2b7ad520
Fix migrate for Xen 3.3
2009-02-13 18:23:23 +00:00
Jim Meyering
f98b9e05d8
test:///default driver: don't dereference NULL "def"
...
* src/test.c (testNetworkCreate, testNetworkDefine): Since "def" is
set to NULL immediately after any vir*AssignDef call (to indicate we
no longer own it and to ensure no clean-up path mistakenly frees it),
dereference via net->def->, not def->.
2009-02-13 18:11:03 +00:00
Guido Günther
6efe591e66
usleep to wait for domain logfile to fill up
2009-02-13 11:35:16 +00:00
Guido Günther
e9c920ba67
fix return status when domain didn't show up
2009-02-11 20:33:11 +00:00
Jim Meyering
98352a103b
libvirtd: new config-file option: unix_sock_dir
...
Before this change, the unix socket directory was hard-coded
to be e.g., /var/run/libvirt for euid==0 and ~/.libvirt otherwise.
With this change, you may now specify that directory in libvirtd's
config file via a line like this: unix_sock_dir = "/var/run/libvirt".
This is essential for running tests that do not impinge on any
existing libvirtd process, and in running tests in parallel.
* qemud/libvirtd.conf (unix_sock_dir): Add comment and example.
* qemud/qemud.h (struct qemud_server) [logDir]: Change type
from char[PATH_MAX] to char*.
* qemud/qemud.c (unix_sock_dir): New global
(remoteReadConfigFile): Set the global.
(qemudInitPaths): Use the global, unix_sock_dir, if non-NULL.
One minor improvement: unlink both sockets or none, never
just one of them.
(qemudCleanup): Free logDir.
(main): Use the new global rather than hard-coding "/run/libvirt".
* qemud/libvirtd.aug (sock_acl_entry): Add "unix_sock_dir".
2009-02-09 17:52:38 +00:00
Jim Meyering
3557096d44
don't print uninitialized in debug diagnostic
...
* qemud/mdns.c (libvirtd_mdns_timeout_new): Don't use local, t,
uninitialized.
2009-02-09 15:38:06 +00:00
Jim Meyering
b92d7e761c
avoid two test failures induced by today's error-reporting changes
...
* tests/cpuset: Adjust expected diagnostic to match new behavior.
* tests/undefine: Likewise.
2009-02-09 15:31:34 +00:00
John Levon
f84c166013
Improve error reporting in virsh
2009-02-09 14:24:06 +00:00
John Levon
fa7f51b813
introduce virSaveLastError(), virFreeError()
2009-02-09 14:16:23 +00:00
Daniel P. Berrange
1290b28f59
Limit virsh history entries to 500 (Jim Paris)
2009-02-09 10:24:27 +00:00
Guido Günther
0437e75291
Don't ignore errors to save domain status
2009-02-07 21:36:06 +00:00
Daniel P. Berrange
9a86716446
Fix 100% libvirt CPU usage when --timeout is set
2009-02-06 14:43:52 +00:00
John Levon
31135bff29
src/domain_conf.c: Check the last error, not the last
...
connection error, which may not have been set.
2009-02-05 19:29:37 +00:00
John Levon
003f354917
xenstore: Use virMacAddrCompare() for case-insensitive comparison
2009-02-05 18:14:00 +00:00
John Levon
b8b4fd4c7d
report error for some xend operations on shutdown domain
2009-02-05 17:24:51 +00:00
John Levon
bc68ae8060
robustify sexpr parser for NICs
2009-02-05 17:17:33 +00:00
Jim Meyering
3909c7d3ed
syntax-check: enable prohibit_nonreentrant
...
* .x-sc_prohibit_nonreentrant: Add src/console.c and virterror.c.
* Makefile.cfg (local-checks-to-skip): Don't exempt
sc_prohibit_nonreentrant.
* Makefile.nonreentrant: Don't exempt strerror.
2009-02-05 16:28:41 +00:00
Jim Meyering
bafd7389e4
remove remainder of offending strerror uses
...
* qemud/qemud.c (GET_CONF_STR): Use virStrerror, not strerror.
* qemud/remote.c (remoteDispatchDomainBlockPeek): Likewise.
(remoteDispatchDomainMemoryPeek, remoteDispatchAuthSaslInit): Likewise.
(remoteDispatchAuthPolkit): Likewise.
* src/lxc_container.c (lxcContainerAvailable): Likewise.
* src/network_driver.c (networkStartNetworkDaemon): Likewise.
(networkShutdownNetworkDaemon): Likewise.
* src/qemu_conf.c (qemudExtractVersion, qemudNetworkIfaceConnect):
* src/storage_conf.c (virStoragePoolLoadAllConfigs): Likewise.
* src/storage_driver.c (storagePoolUndefine): Likewise.
* src/uml_driver.c (umlStartup, umlStartVMDaemon): Likewise.
* src/util.c (virFileReadAll): Likewise.
* src/uuid.c (virUUIDGenerate): Likewise.
* src/xen_internal.c (get_cpu_flags): Likewise.
2009-02-05 16:28:30 +00:00
Jim Meyering
d22a844b46
don't include raw errno in diagnostics
...
* src/uml_driver.c (umlStartVMDaemon): Don't print raw errno value.
* qemud/remote.c (remoteDispatchAuthSaslInit): Likewise.
2009-02-05 16:28:15 +00:00
Jim Meyering
d2758fa13e
qemud.c: use virStrerror, not strerror
2009-02-05 16:28:03 +00:00
Jim Meyering
1e31bfb055
iptables.c: Use virStrerror, not strerror.
...
* src/iptables.c: Include "virterror_internal.h".
Use virStrerror, not strerror.
* src/iptables.c (notifyRulesUpdated): Use %s rather than
string-concatenation that made sc_unmarked_diagnostics report
a false-positive.
2009-02-05 16:27:51 +00:00
Jim Meyering
dcfa920aff
use virReportOOMError rather than more verbose equivalent
...
* src/qemu_driver.c (qemudDomainSave, qemudDomainRestore)
(qemudDomainAttachPciDiskDevice)
(qemudDomainAttachUsbMassstorageDevice):
2009-02-05 16:27:40 +00:00
Jim Meyering
e60430be53
qemu_driver.c: s/strerror/virStrerror.../
...
Perform most changs automatically, with this:
perl -pi -e 's/\bstrerror *\((.+?)\)/virStrerror($1, ebuf, sizeof ebuf)/'
Then, declare ebuf, as needed
2009-02-05 16:27:28 +00:00
Jim Meyering
b0d49913d5
remove duplicate *SetCloseExec and *SetNonBlock functions
...
* src/qemu_driver.c: Use virSetCloseExec and virSetNonBlock,
rather than qemuSet* functions. Suggested by Daniel P. Berrange.
* src/util.c (virSetCloseExec): Publicize.
* src/util.h (virSetCloseExec): Declare
* src/libvirt_private.syms: Add virSetCloseExec.
2009-02-05 16:27:17 +00:00
Jim Meyering
22c9bf6d8b
ChangeLog: correct date formats one last time
2009-02-05 16:25:32 +00:00
Jim Meyering
caea9c00e3
qemu_driver.c: use virReportSystemError in place of some qemudLog uses
...
...thus eliminating many uses of strerror.
(kvmGetMaxVCPUs): Rather than merely warning, diagnose an error
and return -1 upon failure to open KVM_DEVICE. Suggested by
Daniel P. Berrange.
2009-02-05 16:11:25 +00:00
Jim Meyering
7bc569dda9
publicize virStrerror
...
* src/virterror.c (virStrerror): Remove "static".
* src/virterror_internal.h (virStrerror): Declare it.
* src/libvirt_private.syms: Add virStrerror;
2009-02-05 16:10:07 +00:00
Jim Meyering
a9aa76bad5
remove useless code
...
* src/bridge.c (brAddTap): Remove redundant errno=ENOMEM assignment
after failed strdup.
* src/cgroup.c (virCgroupFree): Remove redundant *group=NULL assignment
after VIR_FREE(*group).
* src/lxc_driver.c (lxcShutdown): Likewise.
* src/xen_unified.c (xenUnifiedClose): Likewise.
* src/xm_internal.c (xenXMDomainConfigFormat): Rewrite disk-
and net-config-setting code to be clearer.
2009-02-05 16:03:11 +00:00
Jim Meyering
7faa50d1db
lxc_container: Don't dereference NULL upon failure
...
* src/lxc_container.c (lxcContainerPivotRoot): Free and zero
oldroot *after* printing the diagnostic, both for virFileMakePath
and pivot_root failure.
2009-02-05 15:28:19 +00:00
Jim Meyering
41549b3888
ChangeLog: reformat recent date/name/email lines
2009-02-03 21:12:22 +00:00
Jim Meyering
6778ad0f07
avoid a format-related warning
...
* src/qemu_driver.c (qemudStartVMDaemon): Use "%s".
2009-02-03 13:09:18 +00:00
Jim Meyering
dff2114795
build: enable redundant-const check
...
* Makefile.cfg (local-checks-to-skip): Remove sc_redundant_const.
* src/lxc_controller.c: Remove redundant "const"(s).
* src/storage_backend_fs.c: Likewise.
* src/util.h: Likewise.
* src/xen_internal.c: Likewise.
* tests/qparamtest.c: Likewise.
2009-02-03 13:08:59 +00:00
Jim Meyering
08f87e3d03
syntax-check: enable more checks
...
* Makefile.cfg (local-checks-to-skip): Don't skip sc_m4_quote_check.
Don't skip sc_prohibit_nonreentrant.
* Makefile.nonreentrant (NON_REENTRANT): Comment out until we've
remove all remaining uses of strerror.
2009-02-03 13:08:36 +00:00
Jim Meyering
c18ccff446
cleanup: remove useless if-before-VIR_FREE
...
* Makefile.cfg (useless_free_options): Also check for VIR_FREE.
* src/iptables.c (iptRulesFree): Remove useless if-before-VIR_FREE.
* src/remote_internal.c (remoteAuthSASL): Likewise.
* src/test.c (testOpenFromFile): Likewise.
2009-02-03 13:08:07 +00:00
Jim Meyering
d26c3387df
tests: diagnose more open failures
...
* tests/qemuxml2argvtest.c: Revert the change,
"tests: diagnose open failure" of 2009-01-30.
* tests/testutils.c (virtTestLoadFile): Diagnose failure here.
2009-02-02 20:35:14 +00:00