]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
14 years agoLog client errors in libvirtd at debug priority
Matthias Bolte [Tue, 30 Nov 2010 13:10:42 +0000 (14:10 +0100)]
Log client errors in libvirtd at debug priority

This reverts commit

 Log all errors at level INFO to stop polluting syslog
 04bd0360f32ec628ecf7943b3fd1468d6eb2dde5.

and makes virRaiseErrorFull() log errors at debug priority
when called from inside libvirtd. This stops libvirtd from
polluting it's own log with client errors at error priority
that'll be reported and logged on the client side anyway.

14 years agocorrect the arguments of migrate_speed
Wen Congyang [Thu, 25 Nov 2010 08:38:32 +0000 (16:38 +0800)]
correct the arguments of migrate_speed

When we set migrate_speed by json, we receive the following
error message:
libvirtError: internal error unable to execute QEMU command
'migrate_set_speed': Invalid parameter type, expected: number

The reason is that: the arguments of migrate_set_speed
by json is json number, not json string.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
14 years agotests: Fix detection of expected errors
Jiri Denemark [Mon, 29 Nov 2010 13:11:53 +0000 (14:11 +0100)]
tests: Fix detection of expected errors

14 years agodocs: updated c# bindings with arnauds latest changes
Justin Clift [Mon, 29 Nov 2010 15:12:38 +0000 (02:12 +1100)]
docs: updated c# bindings with arnauds latest changes

14 years agoFix memory leaks in audit & VirtualBox code
Daniel P. Berrange [Wed, 24 Nov 2010 11:49:40 +0000 (11:49 +0000)]
Fix memory leaks in audit & VirtualBox code

* src/util/virtaudit.c: Free audit string
* src/vbox/vbox_XPCOMCGlue.c: Free library name

14 years agoRemove bogus check for Xen in example program
Daniel P. Berrange [Mon, 8 Nov 2010 14:21:49 +0000 (14:21 +0000)]
Remove bogus check for Xen in example program

The dominfo.py example script has a bogus check for /proc/xen
existing. The default connection cannot be assumed to be Xen
any more

* examples/python/dominfo.py: Remove check for Xen

14 years agodoc: Fix spelling of virBufferVSprintf
Jiri Denemark [Thu, 25 Nov 2010 13:48:08 +0000 (14:48 +0100)]
doc: Fix spelling of virBufferVSprintf

14 years agoFix host CPU counting on unusual NUMA topologies
Jiri Denemark [Wed, 24 Nov 2010 10:25:19 +0000 (11:25 +0100)]
Fix host CPU counting on unusual NUMA topologies

The nodeinfo structure includes

    nodes   : the number of NUMA cell, 1 for uniform mem access
    sockets : number of CPU socket per node
    cores   : number of core per socket
    threads : number of threads per core

which does not work well for NUMA topologies where each node does not
consist of integral number of CPU sockets.

We also have VIR_NODEINFO_MAXCPUS macro in public libvirt.h which
computes maximum number of CPUs as (nodes * sockets * cores * threads).

As a result, we can't just change sockets to report total number of
sockets instead of sockets per node. This would probably be the easiest
since I doubt anyone is using the field directly. But because of the
macro, some apps might be using sockets indirectly.

This patch leaves sockets to be the number of CPU sockets per node (and
fixes qemu driver to comply with this) on machines where sockets can be
divided by nodes. If we can't divide sockets by nodes, we behave as if
there was just one NUMA node containing all sockets. Apps interested in
NUMA should consult capabilities XML, which is what they probably do
anyway.

This way, the only case in which apps that care about NUMA may break is
on machines with funky NUMA topology. And there is a chance libvirt
wasn't able to start any guests on those machines anyway (although it
depends on the topology, total number of CPUs and kernel version).
Nothing changes at all for apps that don't care about NUMA.

14 years agoFix broken XML entity for '>'
Philipp Hahn [Thu, 25 Nov 2010 09:40:07 +0000 (10:40 +0100)]
Fix broken XML entity for '>'

Add missing 'g' to '&gt;' of '<product />' source-element.

Signed-off-by: Philipp Hahn <hahn@univention.de>
14 years agosecurity, storage: plug memory leaks for security_context_t
Eric Blake [Wed, 24 Nov 2010 21:09:58 +0000 (14:09 -0700)]
security, storage: plug memory leaks for security_context_t

security_context_t happens to be a typedef for char*, and happens to
begin with a string usable as a raw context string.  But in reality,
it is an opaque type that may or may not have additional information
after the first NUL byte, where that additional information can
include pointers that can only be freed via freecon().

Proof is from this valgrind run of daemon/libvirtd:

==6028== 839,169 (40 direct, 839,129 indirect) bytes in 1 blocks are definitely lost in loss record 274 of 274
==6028==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==6028==    by 0x3022E0D48C: selabel_open (label.c:165)
==6028==    by 0x3022E11646: matchpathcon_init_prefix (matchpathcon.c:296)
==6028==    by 0x3022E1190D: matchpathcon (matchpathcon.c:317)
==6028==    by 0x4F9D842: SELinuxRestoreSecurityFileLabel (security_selinux.c:382)

800k is a lot of memory to be leaking.

* src/storage/storage_backend.c
(virStorageBackendUpdateVolTargetInfoFD): Avoid leak on error.
* src/security/security_selinux.c
(SELinuxReserveSecurityLabel, SELinuxGetSecurityProcessLabel)
(SELinuxRestoreSecurityFileLabel): Use correct function to free
security_context_t.

14 years agonetwork: plug memory leak
Eric Blake [Wed, 24 Nov 2010 20:29:38 +0000 (13:29 -0700)]
network: plug memory leak

* src/conf/network_conf.c (virNetworkDHCPRangeDefParseXML): Free
xml strings when no longer referenced.

14 years agomaint: prohibit most uses of xmlGetProp
Eric Blake [Wed, 24 Nov 2010 20:08:55 +0000 (13:08 -0700)]
maint: prohibit most uses of xmlGetProp

Making this change makes it easier to spot the memory leaks
that will be fixed in the next patch.

* cfg.mk (sc_prohibit_xmlGetProp): New rule.
* .x-sc_prohibit_xmlGetProp: New exception.
* Makefile.am (EXTRA_DIST): Ship exception file.
* tools/virsh.c (cmdDetachInterface, cmdDetachDisk): Adjust
offenders.
* src/conf/storage_conf.c (virStoragePoolDefParseSource):
Likewise.
* src/conf/network_conf.c (virNetworkDHCPRangeDefParseXML)
(virNetworkIPParseXML): Likewise.

14 years agoqemu: plug memory leak
Eric Blake [Wed, 24 Nov 2010 16:04:33 +0000 (09:04 -0700)]
qemu: plug memory leak

https://bugzilla.redhat.com/show_bug.cgi?id=656795

* src/qemu/qemu_monitor.c (qemuMonitorFree): Also free the buffer.

14 years agomaint: ensure syntax check exceptions are distributed
Eric Blake [Sat, 13 Nov 2010 22:18:55 +0000 (15:18 -0700)]
maint: ensure syntax check exceptions are distributed

* Makefile.am (EXTRA_DIST): Factor exceptions files...
(syntax_check_excpetions): into new list.  Include recently added
exceptions.
* cfg.mk (sc_x_sc_dist_check): New check, copied from coreutils.

14 years agobuild: enforce files.h usage
Eric Blake [Sat, 20 Nov 2010 00:25:23 +0000 (17:25 -0700)]
build: enforce files.h usage

* cfg.mk (sc_prohibit_close): New syntax-check rule.
* src/util/pci.c (pciWaitForDeviceCleanup): Fix violation.
* .x-sc_prohibit_close: New exceptions.
* Makefile.am (EXTRA_DIST): Distribute new file.

14 years agoAlways close drivers when a virConnectPtr is released
Matthias Bolte [Wed, 24 Nov 2010 17:10:14 +0000 (18:10 +0100)]
Always close drivers when a virConnectPtr is released

virConnectClose calls virUnrefConnect which in turn closes
all open drivers when the refcount of that connection dropped
to zero. This works fine when you free all other objects that
hold a ref to the connection before you close it, because in
this case virUnrefConnect is the one that removes the last
ref to the connection.

But it doesn't work when you close the connection first before
freeing the other objects. This is because the other virUnref*
functions call virReleaseConnect when they detect that the
connection's refcount dropped to zero. In this case another
virUnref* function (different from virUnrefConnect) removes the
last ref to the connection. This results in not closing the
open drivers and leaking things that should have been cleaned
up in the driver close functions.

To fix this move the driver close calls to virReleaseConnect.

14 years agoImplementations of virDomainIsUpdated for drivers except qemu
Osier Yang [Wed, 24 Nov 2010 07:43:15 +0000 (15:43 +0800)]
Implementations of virDomainIsUpdated for drivers except qemu

Except LXC and UML driver, implementations of all other drivers
simply return 0, because these drivers doesn't have config both
in memory and on disk, no need to track if the domain of these
drivers updated or not.

Rename "xenUnifiedDomainisPersistent" to "xenUnifiedDomainIsPersistent"

* esx/esx_driver.c
* lxc/lxc_driver.c
* opennebula/one_driver.c
* openvz/openvz_driver.c
* phyp/phyp_driver.c
* test/test_driver.c
* uml/uml_driver.c
* vbox/vbox_tmpl.c
* xen/xen_driver.c
* xenapi/xenapi_driver.c

14 years agoimplement callback function for qemu driver
Osier Yang [Mon, 15 Nov 2010 03:23:35 +0000 (11:23 +0800)]
implement callback function for qemu driver

* src/qemu/qemu_driver.c (add function qemuDomainIsUpdated)

14 years agoimplement the remote protocol
Osier Yang [Mon, 15 Nov 2010 03:23:34 +0000 (11:23 +0800)]
implement the remote protocol

* daemon/remote.c
* daemon/remote_dispatch_args.h
* daemon/remote_dispatch_prototypes.h
* daemon/remote_dispatch_ret.h
* daemon/remote_dispatch_table.h
* src/remote/remote_driver.c
* src/remote/remote_protocol.c
* src/remote/remote_protocol.h
* src/remote/remote_protocol.x
* src/remote_protocol-structs

14 years agoimplement public API virDomainIsUpdated
Osier Yang [Thu, 18 Nov 2010 11:12:06 +0000 (19:12 +0800)]
implement public API virDomainIsUpdated

* src/libvirt.c

14 years agodefine internal driver API
Osier Yang [Mon, 15 Nov 2010 03:23:33 +0000 (11:23 +0800)]
define internal driver API

* src/driver.h (new typedef, new callback member for "_virDriver")
* src/esx/esx_driver.c
* src/lxc/lxc_driver.c
* src/opennebula/one_driver.c
* src/openvz/openvz_driver.c
* src/phyp/phyp_driver.c
* src/qemu/qemu_driver.c
* src/remote/remote_driver.c
* src/test/test_driver.c
* src/uml/uml_driver.c
* src/vbox/vbox_tmpl.c
* src/xen/xen_driver.c
* src/xenapi/xenapi_driver.c

14 years agovirDomainIsUpdated: define the new public API
Osier Yang [Mon, 15 Nov 2010 03:23:32 +0000 (11:23 +0800)]
virDomainIsUpdated: define the new public API

introduce new public API "virDomainIsUpdated"

* src/conf/domain_conf.h (new member "updated" for "virDomainObj")
* src/libvirt_public.syms
* include/libvirt/libvirt.h.in

14 years agomaint: sort exports
Eric Blake [Mon, 22 Nov 2010 19:14:14 +0000 (12:14 -0700)]
maint: sort exports

* src/libvirt_private.syms (buf.h): Sort.

14 years agoremote: Fix TLS transport on Windows
Matthias Bolte [Sat, 20 Nov 2010 17:04:42 +0000 (18:04 +0100)]
remote: Fix TLS transport on Windows

gnulib wraps Windows' SOCKET handle based send() and recv() functions
into file descriptor based ones that are used in libvirt.

Even though GnuTLS is using gnulib too, it explicitly doesn't use
gnulib's replacement functions on Windows. By default GnuTLS uses the
SOCKET handle based send() and recv(). This makes gnutls_handshake()
fail internally with a WSAENOTSOCK error because libvirt passes a
file descriptor; GnuTLS needs the SOCKET handle.

To avoid this mismatch make sure that GnuTLS uses gnulib's replacment
functions, by setting custom pull() and push() functions for GnuTLS.

14 years agotests: Fix dispatching internal error reports
Cole Robinson [Tue, 23 Nov 2010 16:01:03 +0000 (11:01 -0500)]
tests: Fix dispatching internal error reports

Without this fix, the test suite doesn't print error messages when a libvirt
function fails. Additionally, only print error reports if DEBUG or VERBOSE
requested.

14 years agolibvirtd: fix bug when shrinking number of clients
Eric Blake [Mon, 22 Nov 2010 19:27:07 +0000 (12:27 -0700)]
libvirtd: fix bug when shrinking number of clients

* daemon/libvirtd.c (qemudRunLoop): Pass allocation size, not
current count, to VIR_SHRINK_N.
* docs/hacking.html.in: Update doc example.
* HACKING: Regenerate.

14 years agoRename 'remove' param to 'toremove' to avoid clash with stdio.h
Daniel P. Berrange [Tue, 23 Nov 2010 13:31:43 +0000 (13:31 +0000)]
Rename 'remove' param to 'toremove' to avoid clash with stdio.h

The stdio.h header has a function called 'remove' declared. This
clashes with the 'remove' parameter in virShrinkN

* src/util/memory.c: Rename 'remove' to 'toremove'

14 years agoFix 32-bit int truncation in QED header check
Daniel P. Berrange [Tue, 23 Nov 2010 13:32:31 +0000 (13:32 +0000)]
Fix 32-bit int truncation in QED header check

* src/util/memory.c: Avoid 32-bit truncation extracting a 64bit int

14 years agoFix error handling in virsh when listing storage volumes
Daniel P. Berrange [Fri, 12 Nov 2010 15:51:14 +0000 (15:51 +0000)]
Fix error handling in virsh when listing storage volumes

virsh was not checking for a error code when listing storage
volumes. So when listing volumes in a pool that was shutoff,
no output was displayed

* tools/virsh.c: Fix error handling when listing volumes

14 years agoImprove SCSI volume name generation
Daniel P. Berrange [Fri, 12 Nov 2010 15:49:40 +0000 (15:49 +0000)]
Improve SCSI volume name generation

The SCSI volumes currently get a name like '17:0:0:1' based
on $host:$bus:$target:$lun. The names are intended to be unique
per pool and stable across pool restarts. The inclusion of the
$host component breaks this, because the $host number for iSCSI
pools is dynamically allocated by the kernel at time of login.
This changes the name to be 'unit:0:0:1', ie removes the leading
host component. The 'unit:' prefix is just to ensure the volume
name doesn't start with a number and make it clearer when seen
out of context.

* src/storage/storage_backend_scsi.c: Improve volume name
  field value stability and uniqueness

14 years agoFix error codes returned when a storage pool is inactive
Daniel P. Berrange [Fri, 12 Nov 2010 15:47:37 +0000 (15:47 +0000)]
Fix error codes returned when a storage pool is inactive

Many operations are not valid on inactive storage pools. The
storage driver is currently returning VIR_ERR_INTERNAL_ERROR
in these cases, rather than the more suitable error code
VIR_ERR_OPERATION_INVALID

* src/storage/storage_driver.c: Fix error code when pool
  is not active

14 years agoCheck whether pools are already active upon libvirtd startup
Daniel P. Berrange [Thu, 11 Nov 2010 20:09:20 +0000 (20:09 +0000)]
Check whether pools are already active upon libvirtd startup

When libvirt starts up all storage pools default to the inactive
state, even if the underlying storage is already active on the
host. This introduces a new API into the internal storage backend
drivers that checks whether a storage pool is already active. If
the pool is active at libvirtd startup, the volume list will be
immediately populated.

* src/storage/storage_backend.h: New internal API for checking
  storage pool state
* src/storage/storage_driver.c: Check whether a pool is active
  upon driver startup
* src/storage/storage_backend_fs.c, src/storage/storage_backend_iscsi.c,
  src/storage/storage_backend_logical.c, src/storage/storage_backend_mpath.c,
  src/storage/storage_backend_scsi.c: Add checks for pool state

14 years agoRemove bogus port handling code in virsh
Daniel P. Berrange [Fri, 12 Nov 2010 13:30:32 +0000 (13:30 +0000)]
Remove bogus port handling code in virsh

The "find-storage-pool-sources-as" command takes two arguments,
a hostname and a port number. For some reason the code would
also then look for a port number appended to the hostname
string by searching for ':'. This totally breaks if the user
gives an IPv6 address, and is redundant, since you can already
provide a port as a separate argument

* tools/virsh.c: Remove bogus port number handling code

14 years agoAllow iSCSI IQN to be set with find-storage-pool-sources-as command
Daniel P. Berrange [Fri, 12 Nov 2010 13:27:51 +0000 (13:27 +0000)]
Allow iSCSI IQN to be set with find-storage-pool-sources-as command

Allow an iSCSI initiator IQN to be set with the XML for the
find-storage-pool-sources-as virsh command

* tools/virsh.c: Add iSCSI IQN support

14 years agoSwitch the virsh XML generation to use virBuffer instead of virAsprintf
Daniel P. Berrange [Fri, 12 Nov 2010 13:25:55 +0000 (13:25 +0000)]
Switch the virsh XML generation to use virBuffer instead of virAsprintf

The code generating XML for storage pool source discovery is
hardcoded to only allow a hostname and optional port number.
Refactor this code to make it easier to add support for extra
parameters.

* tools/virsh.c: Refactor XML generator

14 years agoAdd support for iSCSI target auto-discovery
Daniel P. Berrange [Fri, 12 Nov 2010 15:41:16 +0000 (15:41 +0000)]
Add support for iSCSI target auto-discovery

Since the previous patch added support for parsing the output of
the 'sendtargets' command, it is now trivial to support the
storage pool discovery API.

Given a hostname and optional portnumber and initiator IQN,
the code can return a full list of storage pool source docs,
each one representing a iSCSI target.

* src/storage/storage_backend_iscsi.c: Wire up target
  auto-discovery

14 years agoStop iSCSI targets automatically logging back in after logout
Daniel P. Berrange [Fri, 12 Nov 2010 15:21:48 +0000 (15:21 +0000)]
Stop iSCSI targets automatically logging back in after logout

The Linux iSCSI initiator toolchain has the dubious feature that
if you ever run the 'sendtargets' command to merely query what
targets are available from a server, the results will be recorded
in /var/lib/iscsi. Any time the '/etc/init.d/iscsi' script runs
in the future, it will then automatically login to all those
targets. /etc/init.d/iscsi is automatically run whenever a NIC
comes online.

So from the moment you ask a server what targets are available,
your client will forever more automatically try to login to all
targets without ever asking if you actually want it todo this.

To stop this stupid behaviour, we need to run

  iscsiadm --portal $PORTAL --target $TARGET
   --op update --name node.startup --value manual

For every target on the server.

* src/storage/storage_backend_iscsi.c: Disable automatic login
  for targets found as a result of a 'sendtargets' command

14 years agoRefactor iSCSI driver code to facilitate future changes
Daniel P. Berrange [Tue, 2 Nov 2010 11:40:46 +0000 (11:40 +0000)]
Refactor iSCSI driver code to facilitate future changes

The following series of patches are adding significant
extra functionality to the iSCSI driver. THe current
internal helper methods are not sufficiently flexible
to cope with these changes. This patch refactors the
code to avoid needing to have a virStoragePoolObjPtr
instance as a parameter, instead passing individual
target, portal and initiatoriqn parameters.

It also removes hardcoding of port 3260 in the portal
address, instead using the XML value if any.

* src/storage/storage_backend_iscsi.c: Refactor internal
  helper methods

14 years agoFix parsing of port attribute in storage XML configuration
Daniel P. Berrange [Fri, 12 Nov 2010 13:23:55 +0000 (13:23 +0000)]
Fix parsing of port attribute in storage XML configuration

The XML docs describe a 'port' attribute for the
storage source <host> element, but the parser never
handled it.

* docs/schemas/storagepool.rng: Define port attribute
* src/conf/storage_conf.c: Add missing parsing/formatting
  of host port number
* src/conf/storage_conf.h: Remove bogus/unused 'protocol' field

14 years agoDon't catch SIGCHLD in libvirtd
Daniel P. Berrange [Tue, 23 Nov 2010 10:59:51 +0000 (10:59 +0000)]
Don't catch SIGCHLD in libvirtd

libvirtd no longer deals with SIGCHLD in its signal handler
since the QEMU driver switched to always daemonize processes.
Thus remove the sigaction for it, to avoid warning log
messages

* daemon/libvirtd.c: Don't catch SIGCHLD

14 years agoEnsure logfile isn't truncated by shutdown message.
Daniel P. Berrange [Mon, 22 Nov 2010 13:36:14 +0000 (13:36 +0000)]
Ensure logfile isn't truncated by shutdown message.

When running non-root, the QEMU log file is usually opened with
truncation, since there is no logrotate for non-root usage.
This means that when libvirt logs the shutdown timestamp, the
log is accidentally truncated

* src/qemu/qemu_driver.c: Never truncate log file with shutdown
  message

14 years agoRemove trailing ':' from timestamp
Daniel P. Berrange [Mon, 22 Nov 2010 13:25:36 +0000 (13:25 +0000)]
Remove trailing ':' from timestamp

The QEMU logger appends a ':' to the timestamp when it deems
it neccessary, so the virTimestamp API should not duplicate
this

* src/util/util.c: Remove trailing ':' from timestamp

14 years agoLog all errors at level INFO to stop polluting syslog
Daniel P. Berrange [Thu, 18 Nov 2010 13:14:08 +0000 (13:14 +0000)]
Log all errors at level INFO to stop polluting syslog

Everytime a public API returns an error, libvirtd pollutes
syslog with that error message. Reduce the error logging
level to INFO so these don't appear by default.

* src/util/virterror.c: Log all errors at INFO

14 years agoEnsure virExec preserves logging environment
Daniel P. Berrange [Thu, 18 Nov 2010 13:05:19 +0000 (13:05 +0000)]
Ensure virExec preserves logging environment

The virFork call resets all logging handlers that may have been
set. Re-enable them after fork in virExec, so that env variables
fir LIBVIRT_LOG_OUTPUTS and LIBVIRT_LOG_FILTERS take effect
until the execve()

* src/util/util.c: Preserve logging in child in virExec

14 years agoInclude a thread identifier in log messages
Daniel P. Berrange [Thu, 18 Nov 2010 13:03:56 +0000 (13:03 +0000)]
Include a thread identifier in log messages

To allow messages from different threads to be untangled,
include an integer thread identifier in log messages.

* src/util/logging.c: Include thread ID
* src/util/threads.h, src/util/threads.h, src/util/threads-pthread.c:
  Add new virThreadSelfID() function
* configure.ac: Check for sys/syscall.h

14 years agoqemu: setvcpus: Save config changes to disk
Cole Robinson [Mon, 22 Nov 2010 19:07:02 +0000 (14:07 -0500)]
qemu: setvcpus: Save config changes to disk

Currently changes to the persistent config aren't flushed to disk, meaning
they are lost if the domain is redefined or libvirtd is restarted.

14 years agoqemu: setvcpus: Simplify altering the persistent config
Cole Robinson [Fri, 19 Nov 2010 19:51:46 +0000 (14:51 -0500)]
qemu: setvcpus: Simplify altering the persistent config

Do this by adding a helper function to get the persistent domain config. This
should be useful for other functions that may eventually want to alter
the persistent domain config (attach/detach device). Also make similar changes
to the test drivers setvcpus command.

A caveat is that the function will return the running config for a transient
domain, rather than error. This simplifies callers, as long as they use
other methods to ensure the guest is persistent.

14 years agoqemu: setvcpus: Fix maxvcpus check
Cole Robinson [Mon, 22 Nov 2010 18:55:58 +0000 (13:55 -0500)]
qemu: setvcpus: Fix maxvcpus check

Doing 'virsh setvcpus $vm --config 10' doesn't check the value against the
domains maxvcpus value. A larger value for example will prevent the guest
from starting.

Also make a similar change to the test driver.

14 years agoconf: domain: Improve vcpus validation reporting
Cole Robinson [Mon, 22 Nov 2010 16:34:27 +0000 (11:34 -0500)]
conf: domain: Improve vcpus validation reporting

14 years agoMake state driver device hotplug/update actually transient
Cole Robinson [Fri, 19 Nov 2010 18:36:29 +0000 (13:36 -0500)]
Make state driver device hotplug/update actually transient

The current semantics of non-persistent hotplug/update are confusing: the
changes will persist as long as the in memory domain definition isn't
overwritten. This means hotplug changes stay around until the domain is
redefined or libvirtd is restarted.

Call virDomainObjSetDefTransient at VM startup, so that we properly discard
hotplug changes when the VM is shutdown.

14 years agodomain_conf: Add virDomainObjSetDefTransient
Cole Robinson [Fri, 19 Nov 2010 18:34:19 +0000 (13:34 -0500)]
domain_conf: Add virDomainObjSetDefTransient

This function sets the running domain definition as transient, by reparsing
the persistent config and assigning it to newDef. This ensures that any
changes made to the running definition and not the persistent config are
discarded when the VM is shutdown.

14 years agoxend: Escape reserved sexpr characters
Cole Robinson [Fri, 19 Nov 2010 15:51:57 +0000 (10:51 -0500)]
xend: Escape reserved sexpr characters

If we don't escape ' or \ xend can't parse the generated sexpr. This
might over apply the EscapeSexpr routine, but it shouldn't hurt.

14 years agobuf: Simplify virBufferEscapeString
Cole Robinson [Mon, 22 Nov 2010 17:04:45 +0000 (12:04 -0500)]
buf: Simplify virBufferEscapeString

We are about to copy this function, so clean it up before we do.

14 years agoxend: urlencode: Properly escape '&'
Cole Robinson [Thu, 18 Nov 2010 22:52:05 +0000 (17:52 -0500)]
xend: urlencode: Properly escape '&'

Since we send the sexpr to xend via HTTP, we need to properly escape
'&'

14 years agoconf: Fix parsing python style triple quotes
Cole Robinson [Thu, 18 Nov 2010 22:35:23 +0000 (17:35 -0500)]
conf: Fix parsing python style triple quotes

An incorrect check broke matching the closing set of quotes. Update
tests to cover this case for XM config files.

14 years agoconf: Convert ParseString to use STRPREFIX
Cole Robinson [Thu, 18 Nov 2010 22:33:36 +0000 (17:33 -0500)]
conf: Convert ParseString to use STRPREFIX

14 years agoschemas: domain: Add more valid file path chars
Cole Robinson [Mon, 22 Nov 2010 16:46:13 +0000 (11:46 -0500)]
schemas: domain: Add more valid file path chars

Also, standardize path usage on 'filePath' and 'absFilePath'

14 years agoqed: Minor updates to QED support patches
Adam Litke [Mon, 22 Nov 2010 20:08:17 +0000 (14:08 -0600)]
qed: Minor updates to QED support patches

This patch makes two corrections to the newly-added QED support patch series:

 - Correct the QED header field offsets
 - Remove XML parsing for VIR_STORAGE_FILE_AUTO_SAFE

Signed-off-by: Adam Litke <agl@us.ibm.com>
14 years agodocs: removed outdated reference to virt-mem
Justin Clift [Mon, 22 Nov 2010 11:55:35 +0000 (22:55 +1100)]
docs: removed outdated reference to virt-mem

The virt-mem program is no longer shipped, but was still being
referenced at the bottom of the virsh and libvirtd man pages.

This patch removes it from those man pages, addressing
BZ# 639603:

  https://bugzilla.redhat.com/show_bug.cgi?id=639603

14 years agonwfilter: re-order lock grabbed by IP addr. learn thread
Stefan Berger [Sat, 20 Nov 2010 01:41:25 +0000 (20:41 -0500)]
nwfilter: re-order lock grabbed by IP addr. learn thread

The IP address learning thread was causing a deadlock when it instantiated a filter while a filter update/change was ongoing. The reason for this was the ordering of locks due to the following calls

virNWFilterUnlockFilterUpdates()
virNWFilterPoolObjFindByName()

The below patch now puts the order of the locks in the above shown order when instantiating the filter from the IP address learning thread.

14 years agoSupport for probing qed image metadata
Adam Litke [Fri, 19 Nov 2010 23:19:24 +0000 (16:19 -0700)]
Support for probing qed image metadata

Implement getBackingStore() for QED images.  The header format is defined in
the QED spec: http://wiki.qemu.org/Features/QED .

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Stefan Hajnoczi <stefan.hajnoczi@uk.ibm.com>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>
14 years agostorage_file: Add a new flag to mark backing files that are safe to probe
Adam Litke [Fri, 19 Nov 2010 16:18:17 +0000 (10:18 -0600)]
storage_file: Add a new flag to mark backing files that are safe to probe

Signed-off-by: Adam Litke <agl@us.ibm.com>
14 years agoQED: Basic support for QED images
Adam Litke [Fri, 19 Nov 2010 16:18:16 +0000 (10:18 -0600)]
QED: Basic support for QED images

Add an entry in fileTypeInfo for QED image files.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Stefan Hajnoczi <stefan.hajnoczi@uk.ibm.com>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>
14 years agoAllow probing of image formats without version information
Adam Litke [Fri, 19 Nov 2010 16:18:15 +0000 (10:18 -0600)]
Allow probing of image formats without version information

Disk image formats that wish to opt-out of version validation are supposed to
set versionOffset to -1 in their fileTypeInfo entry.

By unconditionally returning False for these formats,
virStorageFileMatchesVersion() incorrectly reports a version mismatch when the
test was actually skipped.  The correct behavior is to return True so these
formats can be successfully probed using the magic bytes alone.

Signed-off-by: Adam Litke <agl@us.ibm.com>
14 years agomaint: tighten strncmp syntax check
Eric Blake [Wed, 17 Nov 2010 23:41:31 +0000 (16:41 -0700)]
maint: tighten strncmp syntax check

Using 'int ret = strcmp(a, b)' in a qsort function is a valid use of
str[n]cmp that should _not_ be turned to STREQ, but it was falling
foul of our specific syntax-check.  Meanwhile, gnulib's maint.mk
already has a tighter bound for strcmp, so we can copy that regex and
just check for strncmp, which results in fewer false positives that
require exceptions.

* cfg.mk (sc_prohibit_strcmp_and_strncmp): Rename...
(sc_prohibit_strncmp): ...to this, and tighten, to mirror
maint.mk's sc_prohibit_strcmp's better regex.
* Makefile.am (syntax_check_exceptions): Update exception rule.
* .x-sc_prohibit_strcmp_and_strncmp: Rename...
* .x-sc_prohibit_strncmp: ...and trim.

14 years agovirExec: fix bug in setting up child stderr/out with /dev/null
Daniel P. Berrange [Tue, 25 May 2010 11:14:25 +0000 (12:14 +0100)]
virExec: fix bug in setting up child stderr/out with /dev/null

14 years agocapabilities, cpu: use new array API
Eric Blake [Tue, 17 Aug 2010 21:41:51 +0000 (15:41 -0600)]
capabilities, cpu: use new array API

* src/conf/capabilities.h (_virCaps, _virCapsHost, _virCapsGuest)
(_virCapsGuestArch): Add additional fields.
* src/conf/cpu_conf.h (_virCPUDef): Likewise.
* src/conf/capabilities.c (virCapabilitiesFormatXML): Reflect
updated type.
(virCapabilitiesAddGuest, virCapabilitiesAddHostFeature)
(virCapabilitiesAddHostMigrateTransport)
(virCapabilitiesAddHostNUMACell, virCapabilitiesAddGuestFeature)
(virCapabilitiesAddGuestDomain): Use new array APIs.
* src/conf/cpu_conf.c (virCPUDefAddFeature, virCPUDefCopy)
(virCPUDefParseXML): Likewise.
* tests/testutilsqemu.c (testQemuCapsInit): Adjust test.

14 years agodaemon: use safer memory growth macros
Eric Blake [Fri, 13 Aug 2010 22:19:54 +0000 (16:19 -0600)]
daemon: use safer memory growth macros

* daemon/libvirtd.h (qemud_server): Change types of members
tracking array sizes, and add allocation trackers.
* daemon/event.c (virEventLoop): Likewise.
(virEventAddHandleImpl, virEventAddTimeoutImpl)
(virEventCleanupTimeouts, virEventCleanupHandles): Use
VIR_RESIZE_N instead of VIR_REALLOC_N.  Tweak debug messages to
match type changes.
* daemon/libvirtd.c (qemudDispatchServer, qemudRunLoop): Likewise.

14 years agomemory: make it easier to avoid quadratic scaling of arrays
Eric Blake [Sat, 14 Aug 2010 15:42:51 +0000 (09:42 -0600)]
memory: make it easier to avoid quadratic scaling of arrays

* src/util/memory.h (VIR_RESIZE_N): New macro.
* src/util/memory.c (virResizeN): New function.
* src/libvirt_private.syms: Export new helper.
* docs/hacking.html.in: Document it.
* HACKING: Regenerate.

14 years agomemory: make it safer to expand arrays
Eric Blake [Fri, 13 Aug 2010 21:00:47 +0000 (15:00 -0600)]
memory: make it safer to expand arrays

* src/util/memory.h (VIR_REALLOC_N): Update docs.
(VIR_EXPAND_N, VIR_SHRINK_N): New macros.
(virAlloc, virAllocN, virReallocN, virAllocVar, virFree): Add some
gcc attributes.
* src/util/memory.c (virExpandN, virShrinkN): New functions.
(virReallocN): Update docs.
* src/libvirt_private.syms: Export new helpers.
* docs/hacking.html.in: Prefer newer interfaces over
VIR_REALLOC_N, since uninitialized memory can bite us.
* HACKING: Regenerate.

14 years agodoc: Add doc for missed options of migrate
Osier Yang [Thu, 18 Nov 2010 08:21:05 +0000 (16:21 +0800)]
doc: Add doc for missed options of migrate

* tools/virsh.pod (add doc for options like "--p2p", "--direct",
"--copy-storage-all", "dname", etc.)

14 years agodoc: add doc for missed parameters of attach-disk
Osier Yang [Thu, 18 Nov 2010 07:50:02 +0000 (15:50 +0800)]
doc: add doc for missed parameters of attach-disk

* tools/virsh.pod (add docs for --persistent and --sourcetype
of attach-disk, break the long lines in the meantime)

14 years agoFix a failure to restore SELinux label for character devices
Daniel Veillard [Thu, 18 Nov 2010 16:55:14 +0000 (17:55 +0100)]
Fix a failure to restore SELinux label for character devices

The code in SELinuxRestoreSecurityChardevLabel() was trying to
use SELinuxSetFilecon directly for devices or file types while
it should really use SELinuxRestoreSecurityFileLabel encapsulating
routine, which avoid various problems like resolving symlinks,
making sure he file exists and work around NFS problems

14 years agovirt-aa-helper: Fix several compile errors
Matthias Bolte [Wed, 17 Nov 2010 20:31:04 +0000 (21:31 +0100)]
virt-aa-helper: Fix several compile errors

Include locale.h for setlocale().

Revert the usage string back to it's original form.

Use puts() instead of fputs(), as fputs() expects a FILE*.

Add closing parenthesis to some vah_error() calls.

Use argv[0] instead of an undefined argv0.

14 years agobuild: fix autobuild failures on gcov upgrade
Eric Blake [Wed, 17 Nov 2010 17:38:59 +0000 (10:38 -0700)]
build: fix autobuild failures on gcov upgrade

Last time I ran ./autobuild.sh was on F13; and upgrading to F14
exposed these leftovers due to a newer gcov than what was in the stale
files, in the form of spurious messages that break 'make check':

+profiling:/home/remote/eblake/libvirt-tmp/tools/virsh-console.gcda:Version mismatch - expected 405R got 404R

and concluding with a bug in the autobuild.sh script itself:

./autobuild.sh: line 44: test: =: unary operator expected

* autobuild.sh: avoid syntax error on failed test
* tools/Makefile.am (CLEANFILES): Clean coverage files.

14 years agodoc: update virsh manual
Osier Yang [Wed, 17 Nov 2010 14:15:12 +0000 (22:15 +0800)]
doc: update virsh manual

* tools/virsh.pod (change things like "edit domain.xml" into
  "vi domain.xml", so that it's more clear for user)

14 years agomaint: avoid remaining sprintf uses
Eric Blake [Wed, 18 Aug 2010 23:31:39 +0000 (17:31 -0600)]
maint: avoid remaining sprintf uses

* cfg.mk (sc_prohibit_sprintf): New rule.
(sc_prohibit_asprintf): Avoid false positives.
* docs/hacking.html.in (Printf-style functions): Document the
policy.
* HACKING: Regenerate.
* .x-sc_prohibit_sprintf: New exemptions.
* Makefile.am (syntax_check_exceptions): Ship new file.
* src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use
virAsprintf instead.
* src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead.
* tools/virsh.c (cmdDetachInterface): Likewise.
* src/security/security_selinux.c (SELinuxGenSecurityLabel):
Likewise.
* src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise,
and ensure large enough buffer.

14 years agovirt-aa-helper: translate error messages
Eric Blake [Wed, 12 May 2010 17:23:06 +0000 (11:23 -0600)]
virt-aa-helper: translate error messages

These messages are visible to the user, so they should be
consistently translated.

* cfg.mk (msg_gen_function): Add vah_error, vah_warning.
* src/security/virt-aa-helper.c: Translate messages.
(catchXMLError): Fix capitalization.

14 years agomaint: update to latest gnulib
Eric Blake [Tue, 16 Nov 2010 19:29:09 +0000 (12:29 -0700)]
maint: update to latest gnulib

Allows bootstrap to work on FreeBSD, where gzip doesn't have a '.'
in its version; and silences false positives in the new
'make syntax-check' rule.

* .gnulib: Update to latest.
* bootstrap: Synchronize to upstream.
* .x-sc_bindtextdomain: New exemptions.
* Makefile.am (syntax_check_exceptions): Ship new file.
* .gitignore: Regenerate per latest bootstrap, anchor entries that
are only in the root directory, and consolidate entries from other
generated .gitignore files.
* build-aux/.gitignore, m4/.gitignore, po/.gitignore: Remove from
version control, since bootstrap generates them.

14 years agomaint: improve i18n on non-Linux
Eric Blake [Tue, 16 Nov 2010 19:01:37 +0000 (12:01 -0700)]
maint: improve i18n on non-Linux

Per the gettext developer:
http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html
http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html

gettext() doesn't work correctly on all platforms unless you have
called setlocale().  Furthermore, gnulib's gettext.h has provisions
for setting up a default locale, which is the preferred method for
libraries to use gettext without having to call textdomain() and
override the main program's default domain (virInitialize already
calls bindtextdomain(), but this is insufficient without the
setlocale() added in this patch; and a redundant bindtextdomain()
in this patch doesn't hurt, but serves as a good example for other
packages that need to bind a second translation domain).

This patch is needed to silence a new gnulib 'make syntax-check'
rule in the next patch.

* daemon/libvirtd.c (main): Setup locale and gettext.
* src/lxc/lxc_controller.c (main): Likewise.
* src/security/virt-aa-helper.c (main): Likewise.
* src/storage/parthelper.c (main): Likewise.
* tools/virsh.c (main): Fix exit status.
* src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h.
(_): Simplify definition accordingly.
* po/POTFILES.in: Add src/storage/parthelper.c.

14 years agomaint: use gnulib configmake rather than open-coding things
Eric Blake [Tue, 16 Nov 2010 14:54:17 +0000 (07:54 -0700)]
maint: use gnulib configmake rather than open-coding things

* bootstrap.conf (gnulib_modules): Add configmake.
* daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by
gnulib.
* src/Makefile.am (INCLUDES): Likewise.
* tests/Makefile.am (INCLUDES): Likewise.
* tools/Makefile.am (virsh_CFLAGS): Likewise.
* daemon/libvirtd.c (qemudInitPaths, usage, main): Update
clients.
* src/cpu/cpu_map.c (CPUMAPFILE): Likewise.
* src/driver.c (DEFAULT_DRIVER_DIR): Likewise.
* src/internal.h (_): Likewise.
* src/libvirt.c (virInitialize): Likewise.
* src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR):
Likewise.
* src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig):
Likewise.
* src/network/bridge_driver.c (NETWORK_PID_DIR)
(NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise.
* src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup):
Likewise.
* src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise.
* src/qemu/qemu_driver.c (qemudStartup): Likewise.
* src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET)
(LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE)
(LIBVIRT_PKI_DIR): Likewise.
* src/secret/secret_driver.c (secretDriverStartup): Likewise.
* src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise.
* src/security/virt-aa-helper.c (main): Likewise.
* src/storage/storage_backend_disk.c (PARTHELPER): Likewise.
* src/storage/storage_driver.c (storageDriverStartup): Likewise.
* src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise.
* src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise.
* tools/virsh.c (main): Likewise.
* docs/hooks.html.in: Likewise.

14 years agoreplace last instances of close()
Stefan Berger [Wed, 17 Nov 2010 15:19:13 +0000 (10:19 -0500)]
replace last instances of close()

I am replacing the last instances of close() I found with VIR_CLOSE() / VIR_FORCE_CLOSE respectively.

The first part patches virsh, which I missed out on previously.

The 2nd patch I had left out intentionally to look at it more carefully:
The 'closed' variable could be easily removed since it wasn't used anywhere else. The possible race condition that could result from the filedescriptor being closed and not set to -1 (and possibly let us write into 'something' totally different if the fd was allocated by another thread) seems to be prevented by the qemuMonitorLock() already placed around the code that reads from or writes to the fd. So the change of this code as shown in the patch should not have any side-effects.

14 years agonwfilter: also purge ip(6)tables rules before detecting IP address
Stefan Berger [Wed, 17 Nov 2010 02:18:21 +0000 (21:18 -0500)]
nwfilter: also purge ip(6)tables rules before detecting IP address

Rather than only cleaning any remaining ebtables rules, also clean those applied to iptables and ip6tables when detecting the IP address of an interface. Previous applied iptables rules may hinder DHCP packets.

14 years agodeprecate fclose() and introduce VIR_{FORCE_}FCLOSE()
Stefan Berger [Wed, 17 Nov 2010 02:13:29 +0000 (21:13 -0500)]
deprecate fclose() and introduce VIR_{FORCE_}FCLOSE()

Similarly to deprecating close(), I am now deprecating fclose() and
introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with
VIR_FDOPEN().

Most of the files are opened in read-only mode, so usage of
VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write
mode already had the fclose()<  0 check and I converted those to
VIR_FCLOSE()<  0.

I did not find occurrences of possible double-closed files on the way.

14 years agodaemon: fix indention problem in daemon/libvirt.c
Osier Yang [Sat, 13 Nov 2010 00:24:03 +0000 (08:24 +0800)]
daemon: fix indention problem in daemon/libvirt.c

* daemon/libvirtd.c

14 years agoqemu: fix typos in qemu_monitor_text.c
Osier Yang [Fri, 12 Nov 2010 23:08:24 +0000 (07:08 +0800)]
qemu: fix typos in qemu_monitor_text.c

* src/qemu/qemu_monitor_text.c (qemuMonitorTextChangeMedia)

14 years agoqemu: record timestamp in qemu domain log
Osier Yang [Tue, 16 Nov 2010 15:39:26 +0000 (23:39 +0800)]
qemu: record timestamp in qemu domain log

Currently only support domain start and shutdown, for domain start,
record timestamp before the qemu command line, and for domain shutdown,
just say it's shutting down with timestamp.

* src/qemu/qemu_driver.c (qemudStartVMDaemon, qemudShutdownVMDaemon
  introduced two macros - START_POSTFIX, SHUTDOWN_POSTFIX)

14 years agovirsh: add net-info command
Osier Yang [Tue, 16 Nov 2010 07:48:47 +0000 (15:48 +0800)]
virsh: add net-info command

To list basic information about the network.

* tools/virsh.c
* tools/virsh.pod

14 years agonwfilter: use /bin/sh rather than requiring bash
Eric Blake [Tue, 16 Nov 2010 14:53:32 +0000 (07:53 -0700)]
nwfilter: use /bin/sh rather than requiring bash

* src/nwfilter/nwfilter_ebiptables_driver.c (CMD_EXEC): Fix syntax
error in previous patch.
Reported by Stefan Berger.

14 years agonwfilter: use /bin/sh rather than requiring bash
Eric Blake [Sat, 13 Nov 2010 21:48:02 +0000 (14:48 -0700)]
nwfilter: use /bin/sh rather than requiring bash

* src/nwfilter/nwfilter_ebiptables_driver.c
(ebiptablesWriteToTempFile): Use /bin/sh.
(bash_cmd_path): Delete.
(ebiptablesDriverInit, ebiptablesDriverShutdown): No need to
search for bash.
(CMD_EXEC): Prefer $() over ``, since we can assume POSIX.
(iptablesSetupVirtInPost): Use portable 'test' syntax.
(iptablesLinkIPTablesBaseChain): Use POSIX $(()) syntax.

14 years agointerface.rng: Make miimon and arpmon optional for bond interfaces
Laine Stump [Mon, 15 Nov 2010 18:31:31 +0000 (13:31 -0500)]
interface.rng: Make miimon and arpmon optional for bond interfaces

This has been optional in netcf for awhile, but the change hadn't been
propogated to the libvirt copy of the RNG.

14 years agomacvtap: convert send / recv function to use libnl
Stefan Berger [Mon, 15 Nov 2010 18:58:55 +0000 (13:58 -0500)]
macvtap: convert send / recv function to use libnl

In a second step I am converting the netlink send/receive functions to
use libnl.

I tested this with 802.1Qbg profiles and my test server and did not see
a regression.

Caveat: The online documentation of libnl talks about nl_socket_alloc()
but the header file provides nl_handle_alloc() -- this could be a hint
to a possible problem between libnl versions...

http://www.infradead.org/~tgr/libnl/doc/group__socket.html

versus

http://libnl.sourcearchive.com/documentation/1.1/group__socket_gf903c9ea089735b1ba8e40dae801c47d.html

14 years agoFix ipv4-addr definition in interface.rng
Laine Stump [Fri, 12 Nov 2010 21:12:55 +0000 (16:12 -0500)]
Fix ipv4-addr definition in interface.rng

Eric Blake pointed out a deficiency in this regex when it was
copy-pasted into network.rng. This is just propogating the fix back to
its origin.

14 years agoUse python discovered through env instead of hardcoding a path
Matthias Bolte [Sat, 13 Nov 2010 15:34:57 +0000 (16:34 +0100)]
Use python discovered through env instead of hardcoding a path

This is more flexible regarding the location of the python binary
but doesn't allow to pass the -u flag. The -i flag can be passed
from inside the script using the PYTHONINSPECT env variable.

This fixes a problem with the esx_vi_generator.py on FreeBSD.

14 years agoesx: Avoid warnings about breaking strict-aliasing rules on FreeBSD
Matthias Bolte [Sat, 13 Nov 2010 13:32:06 +0000 (14:32 +0100)]
esx: Avoid warnings about breaking strict-aliasing rules on FreeBSD

14 years agoMake sure struct sockaddr_in is defined on FreeBSD
Matthias Bolte [Sat, 13 Nov 2010 13:07:53 +0000 (14:07 +0100)]
Make sure struct sockaddr_in is defined on FreeBSD

14 years agoconfigure: Disable FS storage driver if mntent.h is not available
Matthias Bolte [Sat, 13 Nov 2010 11:33:44 +0000 (12:33 +0100)]
configure: Disable FS storage driver if mntent.h is not available

This is the case on FreeBSD.

14 years agodaemon: Include stdlib.h in dispatch.c
Matthias Bolte [Sat, 13 Nov 2010 11:28:48 +0000 (12:28 +0100)]
daemon: Include stdlib.h in dispatch.c

Otherwise GCC complains about malloc being unknown on FreeBSD.

14 years agodocs: updated virsh command reference with libvirt.org links
Justin Clift [Sat, 13 Nov 2010 13:00:46 +0000 (00:00 +1100)]
docs: updated virsh command reference with libvirt.org links

14 years agoconfigure: Remove bashism and replace 'test ==' with 'test ='
Matthias Bolte [Fri, 12 Nov 2010 20:38:27 +0000 (21:38 +0100)]
configure: Remove bashism and replace 'test ==' with 'test ='

This also fixes configure problems on FreeBSD, as test doesn't
understand '==' there.