]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
16 years agoWork around 'virGetVersion' build problem
Jim Meyering [Tue, 17 Feb 2009 10:33:41 +0000 (10:33 +0000)]
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>
16 years agoavoid compiler warning about unused parameter
Jim Meyering [Tue, 17 Feb 2009 10:26:43 +0000 (10:26 +0000)]
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

16 years agodon't fail daemon-conf test when configured --without-qemu
Jim Meyering [Tue, 17 Feb 2009 10:23:48 +0000 (10:23 +0000)]
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.

16 years agoaccommodate configuring --without-lxc --without-qemu
Jim Meyering [Tue, 17 Feb 2009 10:23:19 +0000 (10:23 +0000)]
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)"

16 years agodoc: fix typo in formatdomain's clock offset specification
Jim Meyering [Tue, 17 Feb 2009 10:19:40 +0000 (10:19 +0000)]
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>.

16 years agoFix I/O errors in libvirtd daemon, and hang/crash in remote client upon I/O error
Daniel P. Berrange [Tue, 17 Feb 2009 09:44:18 +0000 (09:44 +0000)]
Fix I/O errors in libvirtd daemon, and hang/crash in remote client upon I/O error

16 years agoUnbreak virsh *-edit commands: Don't pass unexpected flags to DumpXML
Cole Robinson [Mon, 16 Feb 2009 22:51:31 +0000 (22:51 +0000)]
Unbreak virsh *-edit commands: Don't pass unexpected flags to DumpXML

16 years agoRemove erroneous lvm volume format check for backing store.
Cole Robinson [Mon, 16 Feb 2009 22:47:19 +0000 (22:47 +0000)]
Remove erroneous lvm volume format check for backing store.

16 years agoFix building python bindings: Skip bindings for virSaveLastError and
Cole Robinson [Mon, 16 Feb 2009 22:44:49 +0000 (22:44 +0000)]
Fix building python bindings: Skip bindings for virSaveLastError and
virFreeError

16 years agoAdd virFileWriteStr()
Mark McLoughlin [Fri, 13 Feb 2009 19:13:06 +0000 (19:13 +0000)]
Add virFileWriteStr()

Re-factor the code from networkEnableIpForwarding() into a
utility function in preparation for code which writes to
sysfs files.

16 years agoFix some error strings in xml.c
Mark McLoughlin [Fri, 13 Feb 2009 19:12:45 +0000 (19:12 +0000)]
Fix some error strings in xml.c

Just some copy-and-paste mixups.

16 years agovirXPathInt() and virXPathUInt() don't exist
Mark McLoughlin [Fri, 13 Feb 2009 19:12:20 +0000 (19:12 +0000)]
virXPathInt() and virXPathUInt() don't exist

It looks like these functions have never existed.

16 years agoFix bugzilla link in virsh man page
Mark McLoughlin [Fri, 13 Feb 2009 19:11:59 +0000 (19:11 +0000)]
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.

16 years ago Fix libvirt_proxy.c warnings from gcc-4.4
Mark McLoughlin [Fri, 13 Feb 2009 19:11:37 +0000 (19:11 +0000)]
 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
 ...

16 years agoFix bridge.c warnings with gcc-4.4
Mark McLoughlin [Fri, 13 Feb 2009 19:10:55 +0000 (19:10 +0000)]
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

16 years agoFix migrate for Xen 3.3
John Levon [Fri, 13 Feb 2009 18:23:23 +0000 (18:23 +0000)]
Fix migrate for Xen 3.3

16 years agotest:///default driver: don't dereference NULL "def"
Jim Meyering [Fri, 13 Feb 2009 18:11:03 +0000 (18:11 +0000)]
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->.

16 years agousleep to wait for domain logfile to fill up
Guido Günther [Fri, 13 Feb 2009 11:35:16 +0000 (11:35 +0000)]
usleep to wait for domain logfile to fill up

16 years agofix return status when domain didn't show up
Guido Günther [Wed, 11 Feb 2009 20:33:11 +0000 (20:33 +0000)]
fix return status when domain didn't show up

16 years agolibvirtd: new config-file option: unix_sock_dir
Jim Meyering [Mon, 9 Feb 2009 17:52:38 +0000 (17:52 +0000)]
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".

16 years agodon't print uninitialized in debug diagnostic
Jim Meyering [Mon, 9 Feb 2009 15:38:06 +0000 (15:38 +0000)]
don't print uninitialized in debug diagnostic

* qemud/mdns.c (libvirtd_mdns_timeout_new): Don't use local, t,
uninitialized.

16 years agoavoid two test failures induced by today's error-reporting changes
Jim Meyering [Mon, 9 Feb 2009 15:31:34 +0000 (15:31 +0000)]
avoid two test failures induced by today's error-reporting changes

* tests/cpuset: Adjust expected diagnostic to match new behavior.
* tests/undefine: Likewise.

16 years agoImprove error reporting in virsh
John Levon [Mon, 9 Feb 2009 14:24:06 +0000 (14:24 +0000)]
Improve error reporting in virsh

16 years agointroduce virSaveLastError(), virFreeError()
John Levon [Mon, 9 Feb 2009 14:16:23 +0000 (14:16 +0000)]
introduce virSaveLastError(), virFreeError()

16 years agoLimit virsh history entries to 500 (Jim Paris)
Daniel P. Berrange [Mon, 9 Feb 2009 10:24:27 +0000 (10:24 +0000)]
Limit virsh history entries to 500 (Jim Paris)

16 years agoDon't ignore errors to save domain status
Guido Günther [Sat, 7 Feb 2009 21:36:06 +0000 (21:36 +0000)]
Don't ignore errors to save domain status

16 years agoFix 100% libvirt CPU usage when --timeout is set
Daniel P. Berrange [Fri, 6 Feb 2009 14:43:52 +0000 (14:43 +0000)]
Fix 100% libvirt CPU usage when --timeout is set

16 years agosrc/domain_conf.c: Check the last error, not the last
John Levon [Thu, 5 Feb 2009 19:29:37 +0000 (19:29 +0000)]
src/domain_conf.c: Check the last error, not the last
        connection error, which may not have been set.

16 years agoxenstore: Use virMacAddrCompare() for case-insensitive comparison
John Levon [Thu, 5 Feb 2009 18:14:00 +0000 (18:14 +0000)]
xenstore: Use virMacAddrCompare() for case-insensitive comparison

16 years agoreport error for some xend operations on shutdown domain
John Levon [Thu, 5 Feb 2009 17:24:51 +0000 (17:24 +0000)]
report error for some xend operations on shutdown domain

16 years agorobustify sexpr parser for NICs
John Levon [Thu, 5 Feb 2009 17:17:33 +0000 (17:17 +0000)]
robustify sexpr parser for NICs

16 years agosyntax-check: enable prohibit_nonreentrant
Jim Meyering [Thu, 5 Feb 2009 16:28:41 +0000 (16:28 +0000)]
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.

16 years agoremove remainder of offending strerror uses
Jim Meyering [Thu, 5 Feb 2009 16:28:30 +0000 (16:28 +0000)]
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.

16 years agodon't include raw errno in diagnostics
Jim Meyering [Thu, 5 Feb 2009 16:28:15 +0000 (16:28 +0000)]
don't include raw errno in diagnostics

* src/uml_driver.c (umlStartVMDaemon): Don't print raw errno value.
* qemud/remote.c (remoteDispatchAuthSaslInit): Likewise.

16 years agoqemud.c: use virStrerror, not strerror
Jim Meyering [Thu, 5 Feb 2009 16:28:03 +0000 (16:28 +0000)]
qemud.c: use virStrerror, not strerror

16 years agoiptables.c: Use virStrerror, not strerror.
Jim Meyering [Thu, 5 Feb 2009 16:27:51 +0000 (16:27 +0000)]
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.

16 years agouse virReportOOMError rather than more verbose equivalent
Jim Meyering [Thu, 5 Feb 2009 16:27:40 +0000 (16:27 +0000)]
use virReportOOMError rather than more verbose equivalent

* src/qemu_driver.c (qemudDomainSave, qemudDomainRestore)
(qemudDomainAttachPciDiskDevice)
(qemudDomainAttachUsbMassstorageDevice):

16 years agoqemu_driver.c: s/strerror/virStrerror.../
Jim Meyering [Thu, 5 Feb 2009 16:27:28 +0000 (16:27 +0000)]
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

16 years agoremove duplicate *SetCloseExec and *SetNonBlock functions
Jim Meyering [Thu, 5 Feb 2009 16:27:17 +0000 (16:27 +0000)]
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.

16 years agoChangeLog: correct date formats one last time
Jim Meyering [Thu, 5 Feb 2009 16:25:32 +0000 (16:25 +0000)]
ChangeLog: correct date formats one last time

16 years agoqemu_driver.c: use virReportSystemError in place of some qemudLog uses
Jim Meyering [Thu, 5 Feb 2009 16:11:25 +0000 (16:11 +0000)]
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.

16 years agopublicize virStrerror
Jim Meyering [Thu, 5 Feb 2009 16:10:07 +0000 (16:10 +0000)]
publicize virStrerror

* src/virterror.c (virStrerror): Remove "static".
* src/virterror_internal.h (virStrerror): Declare it.
* src/libvirt_private.syms: Add virStrerror;

16 years agoremove useless code
Jim Meyering [Thu, 5 Feb 2009 16:03:11 +0000 (16:03 +0000)]
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.

16 years agolxc_container: Don't dereference NULL upon failure
Jim Meyering [Thu, 5 Feb 2009 15:28:19 +0000 (15:28 +0000)]
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.

16 years agoChangeLog: reformat recent date/name/email lines
Jim Meyering [Tue, 3 Feb 2009 21:12:22 +0000 (21:12 +0000)]
ChangeLog: reformat recent date/name/email lines

16 years agoavoid a format-related warning
Jim Meyering [Tue, 3 Feb 2009 13:09:18 +0000 (13:09 +0000)]
avoid a format-related warning

* src/qemu_driver.c (qemudStartVMDaemon): Use "%s".

16 years agobuild: enable redundant-const check
Jim Meyering [Tue, 3 Feb 2009 13:08:59 +0000 (13:08 +0000)]
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.

16 years agosyntax-check: enable more checks
Jim Meyering [Tue, 3 Feb 2009 13:08:36 +0000 (13:08 +0000)]
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.

16 years agocleanup: remove useless if-before-VIR_FREE
Jim Meyering [Tue, 3 Feb 2009 13:08:07 +0000 (13:08 +0000)]
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.

16 years agotests: diagnose more open failures
Jim Meyering [Mon, 2 Feb 2009 20:35:14 +0000 (20:35 +0000)]
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.

16 years agofix more printf("%s", NULL) cases
John Levon [Mon, 2 Feb 2009 18:41:56 +0000 (18:41 +0000)]
fix more printf("%s", NULL) cases

16 years agoDon't hardcode ssh port 22, use VIR_FREE, initialize pointers to NULL not 0.
Guido Günther [Sat, 31 Jan 2009 13:49:11 +0000 (13:49 +0000)]
Don't hardcode ssh port 22, use VIR_FREE, initialize pointers to NULL not 0.

16 years agoRelease of 0.6.0
Daniel Veillard [Sat, 31 Jan 2009 11:46:29 +0000 (11:46 +0000)]
Release of 0.6.0
* configure.in docs/* NEWS: release of 0.6.0
* po/*: regenerated and updated brazilian and polish localizations
daniel

16 years ago* docs/news.html*: update with infos for 0.6.0
Daniel Veillard [Sat, 31 Jan 2009 09:14:58 +0000 (09:14 +0000)]
* docs/news.html*: update with infos for 0.6.0
* docs/*: regenerated some data too
daniel

16 years agotests: diagnose open failure
Jim Meyering [Fri, 30 Jan 2009 21:59:35 +0000 (21:59 +0000)]
tests: diagnose open failure

* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Diagnose
failure to open an input file.

16 years agoFix empty declaration in enum declaration
Daniel P. Berrange [Fri, 30 Jan 2009 21:52:22 +0000 (21:52 +0000)]
Fix empty declaration in enum declaration

16 years agoAdded missing shared disk test case
Daniel P. Berrange [Fri, 30 Jan 2009 21:49:12 +0000 (21:49 +0000)]
Added missing shared disk test case

16 years agofix qemud version reporting when qemu is not installed
Jim Meyering [Fri, 30 Jan 2009 19:57:20 +0000 (19:57 +0000)]
fix qemud version reporting when qemu is not installed

* src/qemu_conf.c (uname_normalize): New function, factored out of...
(qemudBuildCommandLine): ...here.  Use the new function.
(qemudExtractVersion): Use it here, rather than hard-coding "i686".

16 years agoFix ifname= passing to QEMU for type=ethernet network config
Daniel P. Berrange [Fri, 30 Jan 2009 17:17:58 +0000 (17:17 +0000)]
Fix ifname= passing to QEMU for type=ethernet network config

16 years agoSupport disk caching mode config
Daniel P. Berrange [Fri, 30 Jan 2009 17:15:39 +0000 (17:15 +0000)]
Support disk caching mode config

16 years agoFix crash using bogus arch in QEMU
Daniel P. Berrange [Fri, 30 Jan 2009 17:12:28 +0000 (17:12 +0000)]
Fix crash using bogus arch in QEMU

16 years agoFix numerous bugs in QEMU domain startup
Daniel P. Berrange [Fri, 30 Jan 2009 17:07:29 +0000 (17:07 +0000)]
Fix numerous bugs in QEMU domain startup

16 years agoFix valgrind crash in LXC & avoid probing unneccessarily
Daniel P. Berrange [Fri, 30 Jan 2009 16:51:33 +0000 (16:51 +0000)]
Fix valgrind crash in LXC & avoid probing unneccessarily

16 years agoFix leak of storage vols when freeing pool
Daniel P. Berrange [Fri, 30 Jan 2009 16:48:52 +0000 (16:48 +0000)]
Fix leak of storage vols when freeing pool

16 years agoFix leak in serializing error message from daemon to client
Daniel P. Berrange [Fri, 30 Jan 2009 16:48:02 +0000 (16:48 +0000)]
Fix leak in serializing error message from daemon to client

16 years agoFix yet another printf("%s", NULL) case
John Levon [Fri, 30 Jan 2009 15:43:05 +0000 (15:43 +0000)]
Fix yet another printf("%s", NULL) case
Fix getpwuid_r() usage
Fix virsh migrateuri handling

16 years agoMisc xen driver bug/crash fixes
Daniel P. Berrange [Thu, 29 Jan 2009 23:01:37 +0000 (23:01 +0000)]
Misc xen driver bug/crash fixes

16 years agoFix xend XML generation when CPU pinning is used
John Levon [Thu, 29 Jan 2009 18:40:32 +0000 (18:40 +0000)]
Fix xend XML generation when CPU pinning is used

16 years agomaint: sync from coreutils
Jim Meyering [Thu, 29 Jan 2009 18:06:19 +0000 (18:06 +0000)]
maint: sync from coreutils

* .x-sc_prohibit_have_config_h: Renamed from...
* .x-sc_no_have_config_h: ... this.
* .x-sc_prohibit_HAVE_MBRTOWC: New file.

16 years agoSupport VNC password setting in QEMU driver
Daniel P. Berrange [Thu, 29 Jan 2009 17:50:00 +0000 (17:50 +0000)]
Support VNC password setting in QEMU driver

16 years agoFix save/restore migrate syntax for new KVM releases
Daniel P. Berrange [Thu, 29 Jan 2009 17:27:54 +0000 (17:27 +0000)]
Fix save/restore migrate syntax for new KVM releases

16 years agofix another printf("%s", NULL) case
John Levon [Thu, 29 Jan 2009 17:18:24 +0000 (17:18 +0000)]
fix another printf("%s", NULL) case

16 years agoadd missing files
John Levon [Thu, 29 Jan 2009 17:14:48 +0000 (17:14 +0000)]
add missing files

16 years agocorrectly enable floppies for HVM guests.
John Levon [Thu, 29 Jan 2009 17:05:49 +0000 (17:05 +0000)]
correctly enable floppies for HVM guests.

16 years agofix VNC port reporting when vncunused is set
John Levon [Thu, 29 Jan 2009 17:02:00 +0000 (17:02 +0000)]
fix VNC port reporting when vncunused is set

16 years ago* Makefile.cfg: disable some new checks
Jim Meyering [Thu, 29 Jan 2009 12:11:49 +0000 (12:11 +0000)]
* Makefile.cfg: disable some new checks

16 years ago* Makefile.maint: sync from coreutils
Jim Meyering [Thu, 29 Jan 2009 12:11:28 +0000 (12:11 +0000)]
* Makefile.maint: sync from coreutils

16 years agoprohibit new uses of VIR_ERR_NO_MEMORY
Jim Meyering [Thu, 29 Jan 2009 12:10:52 +0000 (12:10 +0000)]
prohibit new uses of VIR_ERR_NO_MEMORY

* Makefile.maint (sc_prohibit_VIR_ERR_NO_MEMORY): New rule.
* .x-sc_prohibit_VIR_ERR_NO_MEMORY: New file: exceptions.

16 years agoerror-reporting calls using VIR_ERR_NO_MEMORY: use virReportOOMError instead
Jim Meyering [Thu, 29 Jan 2009 12:10:32 +0000 (12:10 +0000)]
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

16 years agodon't abort if setlocale() fails
Guido Günther [Thu, 29 Jan 2009 11:49:33 +0000 (11:49 +0000)]
don't abort if setlocale() fails

16 years agoFix typo & tweak variable decl
Daniel P. Berrange [Wed, 28 Jan 2009 22:07:36 +0000 (22:07 +0000)]
Fix typo & tweak variable decl

16 years agoStopping reading off wire after 1 complete RPC message is received
Daniel P. Berrange [Wed, 28 Jan 2009 22:00:32 +0000 (22:00 +0000)]
Stopping reading off wire after 1 complete RPC message is received

16 years agoFix bogus valgrind memory leak warnings in test suite
Daniel P. Berrange [Wed, 28 Jan 2009 21:53:48 +0000 (21:53 +0000)]
Fix bogus valgrind memory leak warnings in test suite

16 years agoSolaris portability for RPC code data types
Daniel P. Berrange [Wed, 28 Jan 2009 21:33:56 +0000 (21:33 +0000)]
Solaris portability for RPC code data types

16 years agoremote_internal.c: fix typo that would mistakenly report OOM
Jim Meyering [Wed, 28 Jan 2009 16:14:24 +0000 (16:14 +0000)]
remote_internal.c: fix typo that would mistakenly report OOM

* src/remote_internal.c (addrToString): Report VIR_ERR_UNKNOWN_HOST,
not VIR_ERR_NO_MEMORY.

16 years agoqparams.c: Use virReportOOMError(NULL), not qparam_report_oom()
Jim Meyering [Wed, 28 Jan 2009 16:13:46 +0000 (16:13 +0000)]
qparams.c: Use virReportOOMError(NULL), not qparam_report_oom()

* src/qparams.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
(qparam_report_oom): Remove definition.
Replace all uses.

16 years agofix mis-use of PF_UNIX as a protocol
John Levon [Wed, 28 Jan 2009 14:36:23 +0000 (14:36 +0000)]
fix mis-use of PF_UNIX as a protocol

16 years agolibvirt_proxy: avoid potential buffer overflow
Jim Meyering [Wed, 28 Jan 2009 14:08:33 +0000 (14:08 +0000)]
libvirt_proxy: avoid potential buffer overflow

* proxy/libvirt_proxy.c (proxyReadClientSocket): Ensure that
we've read an entire virProxyPacket before dereferencing "req".
Analysis and patch by "Rasputin" <rasputin@email.ru>.  Details in
<http://thread.gmane.org/gmane.comp.emulators.libvirt/11459>.

16 years ago* po/POTFILES.in: Add src/lxc_conf.c
Jim Meyering [Wed, 28 Jan 2009 13:59:56 +0000 (13:59 +0000)]
* po/POTFILES.in: Add src/lxc_conf.c

16 years agoremove reference to non-existent *.res
John Levon [Wed, 28 Jan 2009 13:45:50 +0000 (13:45 +0000)]
remove reference to non-existent *.res

16 years agoavoid printf format-mismatch warnings
Jim Meyering [Wed, 28 Jan 2009 11:31:39 +0000 (11:31 +0000)]
avoid printf format-mismatch warnings

* qemud/qemud.c (qemudClientReadBuf, qemudClientWriteBuf):
Use %lld and a (long long int) cast to print a ssize_t value.

16 years agoAdd support for copy-on-write storage volumes
Daniel P. Berrange [Tue, 27 Jan 2009 18:30:03 +0000 (18:30 +0000)]
Add support for copy-on-write storage volumes

16 years ago* POTFILES.in: update: remove src/lxc_conf.c; Add src/bridge.c.
Jim Meyering [Tue, 27 Jan 2009 15:37:34 +0000 (15:37 +0000)]
* POTFILES.in: update: remove src/lxc_conf.c; Add src/bridge.c.

16 years agoAdded complete set of RNG schemas for all XML formats
Daniel P. Berrange [Tue, 27 Jan 2009 15:29:53 +0000 (15:29 +0000)]
Added complete set of RNG schemas for all XML formats

16 years agoAdded link to libvirt-qpid on front page, and docs on URI formats for each driver
Daniel P. Berrange [Tue, 27 Jan 2009 14:49:09 +0000 (14:49 +0000)]
Added link to libvirt-qpid on front page, and docs on URI formats for each driver

16 years agovirterror.c: don't read beyond end of buffer upon OOM
Jim Meyering [Tue, 27 Jan 2009 12:26:53 +0000 (12:26 +0000)]
virterror.c: don't read beyond end of buffer upon OOM

* src/virterror.c (virReportSystemErrorFull): Fix typo in
my previous change.  Patch by Daniel P. Berrange.

16 years agokvm/virtio: Set IFF_VNET_HDR when setting up tap fds
Mark McLoughlin [Tue, 27 Jan 2009 11:12:05 +0000 (11:12 +0000)]
kvm/virtio: Set IFF_VNET_HDR when setting up tap fds

IFF_VNET_HDR is a tun/tap flag that allows you to send and receive
large (i.e. GSO) packets and packets with partial checksums. Setting
the flag means that every packet is proceeded by the same header which
virtio uses to communicate GSO/csum metadata.

By enabling this flag on the tap fds we create, we greatly increase
the achievable throughput with virtio_net.

However, we need to be careful to only set the flag when a) QEMU has
support for this ABI and b) the value of the flag is queryable using
the TUNGETIFF ioctl.

It's nearly five months since kvm-74 - the first KVM release with this
feature - was released. Up until now, we've not added libvirt support
because there is no clean way to detect support for this in QEMU at
runtime. A brief attempt to add a "info capabilities" monitor command
to QEMU floundered. Perfect is the enemy of good enough. Probing the
KVM version will suffice for now.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
16 years agofix errors in virReportSystemErrorFull
Jim Meyering [Tue, 27 Jan 2009 10:57:18 +0000 (10:57 +0000)]
fix errors in virReportSystemErrorFull

* src/virterror.c (virStrerror): New function.
(virReportSystemErrorFull): Don't leak "combined".
In fact, don't even attempt allocation.
Do include the result of formatted print in final diagnostic.

16 years agouse gnulib's stpcpy module
Jim Meyering [Tue, 27 Jan 2009 10:30:30 +0000 (10:30 +0000)]
use gnulib's stpcpy module

* bootstrap (modules): Add stpcpy, and pull in gnulib bits:
* gnulib/lib/stpcpy.c: New file.
* gnulib/m4/stpcpy.m4: New file.
* gnulib/lib/Makefile.am: Update.
* gnulib/m4/gnulib-cache.m4: Update.
* gnulib/m4/gnulib-comp.m4: Update.

16 years agoupdate from gnulib
Jim Meyering [Tue, 27 Jan 2009 10:29:55 +0000 (10:29 +0000)]
update from gnulib