]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
14 years agoMerge all returns paths from dispatcher into single path
Daniel P. Berrange [Wed, 13 Apr 2011 15:21:35 +0000 (16:21 +0100)]
Merge all returns paths from dispatcher into single path

The dispatcher functions have numerous places where they
return to the caller. This leads to duplicated cleanup
code, often resulting in memory leaks. It makes it harder
to ensure that errors are dispatched before freeing objects,
which may overwrite the original error.

The standard pattern is now

    remoteDispatchXXX(...) {
        int rv = -1;

        ....
        if (XXX < 0)
          goto cleanup;
        ...
        if (XXXX < 0)
          goto cleanup;
        ...

        rv = 0;
    cleanup:
        if (rv < 0)
           remoteDispatchError(rerr);
        ...free all other stuff..
        return rv;
    }

* daemon/remote.c: Centralize all cleanup paths
* daemon/stream.c: s/remoteDispatchConnError/remoteDispatchError/
* daemon/dispatch.c, daemon/dispatch.h: Replace
  remoteDispatchConnError with remoteDispatchError
  removing unused virConnectPtr

14 years agoExperimental libvirtd upstart job
Alan Pevec [Fri, 18 Feb 2011 18:45:49 +0000 (19:45 +0100)]
Experimental libvirtd upstart job

To install it, disable libvirtd sysv initscript:
    chkconfig libvirtd off
    service libvirtd stop

and enable libvirtd upstart job:
    cp  /usr/share/doc/libvirt-*/libvirtd.upstart \
        /etc/init/libvirtd.conf
    initctl reload-configuration
    initctl start libvirtd

Test:
    initctl status libvirtd
libvirtd start/running, process 3929
    killall -9 libvirtd
    initctl status libvirtd
libvirtd start/running, process 4047

I looked into the possibility to use the upstart script from Ubuntu or
at least getting inspiration from it but that's not possible. "expect
daemon" is a nice thing but it only works if the process is defined with
exec stanza instead of script ... no script. Unfortunately, with exec
stanza environment variables can only be set within upstart script
(i.e., configuration in /etc/sysconfig/libvirtd can't work). Hence, we
need to use script stanza, source sysconfig, and execute libvirtd
without --daemon. For similar reasons we can't use limit stanza and need
to handle DAEMON_COREFILE_LIMIT in job's script.

14 years agoenhance processWatchdogEvent()
Wen Congyang [Fri, 15 Apr 2011 03:11:39 +0000 (11:11 +0800)]
enhance processWatchdogEvent()

This patch does the following two things:
1. hold an extra reference while handling watchdog event
   If the domain is not persistent, and qemu quits unexpectedly before
   calling processWatchdogEvent(), vm will be freed and the function
   processWatchdogEvent() will be dangerous.

2. unlock qemu driver and vm before returning from processWatchdogEvent()
   When the function processWatchdogEvent() failed, we only free wdEvent,
   but forget to unlock qemu driver and vm, free dumpfile.

14 years agoqemu: avoid qemu_driver being unlocked twice when virThreadPoolNew() failed
Wen Congyang [Wed, 6 Apr 2011 07:53:11 +0000 (15:53 +0800)]
qemu: avoid qemu_driver being unlocked twice when virThreadPoolNew() failed

We do not lock qemu_driver when calling virThreadPoolNew(). If it failed,
we will unlock qemu_driver. It is dangerous.

We may use this pool during auto starting domains. So we must create it before
calling qemuAutostartDomains(). Otherwise, libvirtd will crash.

14 years agoFix two out-of-date comments in LVM backend
Richard Laager [Sun, 17 Apr 2011 06:34:10 +0000 (08:34 +0200)]
Fix two out-of-date comments in LVM backend

14 years agoxen: Replace statsErrorFunc with a macro
Matthias Bolte [Sat, 16 Apr 2011 09:30:40 +0000 (11:30 +0200)]
xen: Replace statsErrorFunc with a macro

Also mark error messages in block_stats.c for translation, add the
new macro to the msg_gen functions in cfg.mk and add block_stats.c
to po/POTFILES.in

14 years agoRemove virConnectPtr from virRaiseErrorFull
Matthias Bolte [Sat, 16 Apr 2011 08:30:22 +0000 (10:30 +0200)]
Remove virConnectPtr from virRaiseErrorFull

And from all related macros and functions.

14 years agotests: Unit tests for internal hash APIs
Jiri Denemark [Fri, 15 Apr 2011 11:15:37 +0000 (13:15 +0200)]
tests: Unit tests for internal hash APIs

This is a basic set of tests for testing removals of hash entries during
iteration.

14 years agobuild: include esx_vi.generated.* into dist file
Wen Congyang [Fri, 15 Apr 2011 03:00:35 +0000 (11:00 +0800)]
build: include esx_vi.generated.* into dist file

commit d4601696 introduces two more generated files: esx_vi.generated.h
and esx_vi.generated.h. But we do not include them into dist file.
It will break building if using dist file to build.

14 years agotests: test recent virsh option parsing changes
Eric Blake [Tue, 12 Apr 2011 21:59:19 +0000 (15:59 -0600)]
tests: test recent virsh option parsing changes

* tests/virsh-optparse: New file.
* tests/Makefile.am (test_scripts): Use it.

14 years agovirsh: fix regression in parsing optional integer
Eric Blake [Tue, 12 Apr 2011 20:42:59 +0000 (14:42 -0600)]
virsh: fix regression in parsing optional integer

Regression introduced in 0.8.5, commit c1564268.  The command
'virsh freecell 0' quit working when it changed from an optional
string to an optional integer.

This patch introduces a slight change that specifying an option
twice is now detected as an error.  It also changes things so
that a command that has more than 1 required option will not
complain about missing options if one but not all of the options
were given in long format, as in 'virsh vol-create --pool p file',
as well as making positional parsing work for all optional
options (each positional argument is associated with the earliest
option that has not yet been seen by name).

Optional boolean options can appear before required argument
options, because they don't affect positional argument parsing,
and obviously a required boolean option makes no sense.

Technically, this patch renders VSH_OT_STRING and VSH_OT_DATA
redundant; but cleaning that up can be a separate patch.

No command should ever need more than 32 options, right? :)

* tools/virsh.c (vshCmddefGetData, vshCmddefGetOption)
(vshCommandCheckOpts): Alter parameters to use bitmaps.
(vshCmddefOptParse): New function.
(vshCommandParse): Update for better handling of positional
arguments.
(vshCmddefHelp): Allow unit tests to validate options.

14 years agovirsh: list required options first
Eric Blake [Tue, 12 Apr 2011 20:58:02 +0000 (14:58 -0600)]
virsh: list required options first

The current state of virsh parsing is that:

$ virsh vol-info /path/to/image
$ virsh vol-info --pool default /path/to/image
$ virsh vol-info --pool default --vol /path/to/image

all lookup the volume by path (technically, the last two also attempt
a name lookup within a pool, whereas the first skips that step, but
the end result is the same); meanwhile:

$ virsh vol-info default /path/to/image

complains about unexpected data.  Why?  Because the --pool option is
optional, so default was parsed as the --vol argument, and
/path/to/image.img doesn't match up with any remaining options that
require an argument.  For proof, note that:

$ virsh vol-info default --vol /path/to/image

complains about looking up 'default' - the parser mis-associated both
arguments with --vol.  Given the above, the only way to specify pool
is with an explicit "--pool" argument (you can't specify it
positionally).  However, named arguments can appear in any order, so:

$ virsh vol-info /path/to/image --pool default
$ virsh vol-info --vol /path/to/image --pool default

have also always worked.  Therefore, this patch has no functional
change on vol-info option parsing, but only on 'virsh help vol-info'
synopsis layout.  However, it also allows the next patch to 1) enforce
that required options are always first (without this patch, the next
patch would fail the testsuite), and 2) allow the user to omit the
"--pool" argument.  That is, the next patch makes it possible to do:

$ virsh vol-info /path/to/image default

which to date was not possible.

* tools/virsh.c (opts_vol_create_from, opts_vol_clone)
(opts_vol_upload, opts_vol_download, opts_vol_delete)
(opts_vol_wipe, opts_vol_info, opts_vol_dumpxml, opts_vol_key)
(opts_vol_path): List optional pool parameter after required
arguments.

14 years agophyp: avoid memory leaks in command values
Eric Blake [Wed, 13 Apr 2011 20:13:33 +0000 (14:13 -0600)]
phyp: avoid memory leaks in command values

* src/phyp/phyp_driver.c (phypExecBuffer): New function. Use it
throughout file for less code, and for plugging a few leaks.

14 years agophyp: use consistent return string handling
Eric Blake [Thu, 14 Apr 2011 19:02:17 +0000 (13:02 -0600)]
phyp: use consistent return string handling

Use the name 'ret' for all phypExec results, to make it easier
to wrap phypExec.  Don't allow a possibly NULL ret through printf.

* src/phyp/phyp_driver.c (phypBuildVolume, phypDestroyStoragePool)
(phypBuildStoragePool, phypBuildLpar): Avoid NULL dereference.
(phypInterfaceDestroy): Avoid redundant free.
(phypVolumeLookupByPath, phypVolumeGetPath): Use consistent
naming.

14 years agophyp: prefer memcpy over memmove when legal
Eric Blake [Wed, 13 Apr 2011 20:59:06 +0000 (14:59 -0600)]
phyp: prefer memcpy over memmove when legal

* src/phyp/phyp_driver.c (phypUUIDTable_AddLpar)
(phypGetLparUUID, phypGetStoragePoolUUID, phypVolumeGetXMLDesc)
(phypGetStoragePoolXMLDesc): Use faster method.

14 years agophyp: use consistent style for labels
Eric Blake [Thu, 14 Apr 2011 18:53:52 +0000 (12:53 -0600)]
phyp: use consistent style for labels

* src/phyp/phyp_driver.c: Match label style of rest of project.
(phypExec, phypUUIDTable_Pull): Drop an extra label.

14 years agophyp: more return handling cleanup
Eric Blake [Thu, 14 Apr 2011 18:52:09 +0000 (12:52 -0600)]
phyp: more return handling cleanup

* src/phyp/phyp_driver.c (phypInterfaceDestroy)
(phypInterfaceDefineXML, phypInterfaceLookupByName)
(phypInterfaceIsActive, phypListInterfaces, phypNumOfInterfaces):
Clean up return handling of recent additions.

14 years agophyp: avoid memory leak on failure
Eric Blake [Thu, 14 Apr 2011 17:32:39 +0000 (11:32 -0600)]
phyp: avoid memory leak on failure

* src/phyp/phyp_driver.c (phypUUIDTable_Init): Avoid memory leak
on error.

14 years agophyp: avoid a logic bug
Eric Blake [Thu, 14 Apr 2011 16:35:42 +0000 (10:35 -0600)]
phyp: avoid a logic bug

Ever since commit ebc46f, the destroy function built two command
variants but only used one.  I went with the variant that matches
the idiom used in the counterpart of phypBuildStoragePool.

* src/phyp/phyp_driver.c (phypDestroyStoragePool): Avoid
clobbering cmd.  Fix error message typo.

14 years agomaint: use lighter-weight function for straight appends
Eric Blake [Thu, 14 Apr 2011 19:27:47 +0000 (13:27 -0600)]
maint: use lighter-weight function for straight appends

It costs quite a few processor cycles to go through printf parsing
just to determine that we only meant to append.

* src/xen/xend_internal.c (xend_op_ext): Consolidate multiple
printfs into one.
* src/qemu/qemu_command.c (qemuBuildWatchdogDevStr)
(qemuBuildUSBInputDevStr, qemuBuildSoundDevStr)
(qemuBuildSoundCodecStr, qemuBuildVideoDevStr): Likewise.
(qemuBuildCpuArgStr, qemuBuildCommandLine): Prefer virBufferAdd
over virBufferVsprintf for trivial appends.
* src/phyp/phyp_driver.c (phypExec, phypUUIDTable_Push)
(phypUUIDTable_Pull): Likewise.
* src/conf/nwfilter_conf.c (macProtocolIDFormatter)
(arpOpcodeFormatter, formatIPProtocolID, printStringItems)
(virNWFilterPrintStateMatchFlags, virNWIPAddressFormat)
(virNWFilterDefFormat): Likewise.
* src/security/virt-aa-helper.c (main): Likewise.
* src/util/sexpr.c (sexpr2string): Likewise.
* src/xenxs/xen_sxpr.c (xenFormatSxprChr): Likewise.
* src/xenxs/xen_xm.c (xenFormatXMDisk): Likewise.

14 years agoesx: Fix gcc 4.6 warning about initialized but unused variables
Matthias Bolte [Thu, 14 Apr 2011 17:18:27 +0000 (19:18 +0200)]
esx: Fix gcc 4.6 warning about initialized but unused variables

This warnings come from partly generated code. Therefore, the best
solution is to mark them as potentially being unused using the
ATTRIBUTE_UNUSED macro. This is suggested by the gcc documentation.

Reported by Christophe Fergeau

14 years agolibvirt-guests: implement START_DELAY
Alexander Todorov [Fri, 15 Apr 2011 08:57:06 +0000 (11:57 +0300)]
libvirt-guests: implement START_DELAY

Allow libvirt-guests to stage a delay between guest startups,
to avoid system load caused by back-to-back startup.

14 years agomaint: silence cppi warnings
Eric Blake [Thu, 14 Apr 2011 19:32:25 +0000 (13:32 -0600)]
maint: silence cppi warnings

* src/nodeinfo.c (linuxNodeInfoCPUPopulate): Fix indentation of
last patch.

14 years agonetwork: truncate bridges' dummy tap device names to IFNAMSIZ (15) chars
Laine Stump [Wed, 13 Apr 2011 16:38:58 +0000 (12:38 -0400)]
network: truncate bridges' dummy tap device names to IFNAMSIZ (15) chars

This patch addresses:

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

In order to give each libvirt-created bridge a fixed MAC address,
commit 5754dbd56d4738112a86776c09e810e32f7c3224, added code to create
a dummy tap device with guaranteed lowest MAC address and attach it to
the bridge. This tap device was given the name "${bridgename}-nic".
However, an interface device name must be IFNAMSIZ (15) characters or
less, so a valid ${bridgename} such as "verylongname123" (15
characters) would lead to an invalid tap device name
("verylongname123-nic" - 19 characters), and that in turn led to a
failure to bring up the network.

The solution is to shorten the part of the original name used to
generate the tap device name. However, simply truncating it is
insufficient, because the last few characters of an interface name are
often a number used to indicate one of a list of several similar
devices (for example, "verylongname123", "verylongname124", etc) and
simple truncation would lead to duplicate names (eg "verlongnam-nic"
and "verylongnam-nic"). So instead we take the first 8 characters of
$bridgename ("verylong" in the example), add on the final 3 bytes
("123"), then add "-nic" (so "verylong123-nic").  Not pretty, but it
is much more likely to generate a unique name, and is reproducible
(unlike, say, a random number).

14 years agoppc: Enable starting of Qemu VMs on ppc host
Stefan Berger [Thu, 14 Apr 2011 18:50:22 +0000 (14:50 -0400)]
ppc: Enable starting of Qemu VMs on ppc host

Due to differences in /proc/cpuinfo the parsing of the cpu data is
different between architectures. On PPC /proc/cpuinfo looks like this:

[original formatting with tabs]

processor    : 0
cpu          : PPC970MP, altivec supported
clock        : 2297.700000MHz
revision     : 1.1 (pvr 0044 0101)

processor    : 1
cpu          : PPC970MP, altivec supported
clock        : 2297.700000MHz
revision     : 1.1 (pvr 0044 0101)

[..]

timebase     : 14318000
platform     : pSeries
model        : IBM,8844-AC1
machine      : CHRP IBM,8844-AC1

The patch adapts the parsing of the data found in /proc/cpuinfo.

/sys/devices/system/cpu/cpuX/topology/physical_package_id also
always returns -1. Check for it on ppc and make it '0' if found negative.

14 years agoMigrate VMs between different-endianess hosts
Stefan Berger [Thu, 14 Apr 2011 18:48:03 +0000 (14:48 -0400)]
Migrate VMs between different-endianess hosts

This patch enables the migration of Qemu VMs between hosts of different endianess. I tested this by migrating a i686 VM between a x86 and ppc64 host.

I am converting the 'int's in the VM's state header to uint32_t assuming this doesn't break compatibility with existing deployments other than Linux.

14 years agoFix gcc 4.6 warnings in vbox_tmpl.c
Christophe Fergeau [Thu, 14 Apr 2011 12:10:36 +0000 (14:10 +0200)]
Fix gcc 4.6 warnings in vbox_tmpl.c

14 years agoFix gcc 4.6 warnings
Christophe Fergeau [Thu, 14 Apr 2011 09:22:35 +0000 (11:22 +0200)]
Fix gcc 4.6 warnings

gcc 4.6 warns when a variable is initialized but isn't used afterwards:

vmware/vmware_driver.c:449:18: warning: variable 'vmxPath' set but not used [-Wunused-but-set-variable]

This patch fixes these warnings. There are still 2 offending files:

- vbox_tmpl.c: the variable is used inside an #ifdef and is assigned several
  times outside of #ifdef. Fixing the warning would have required wrapping
  all the assignment inside #ifdef which hurts readability.

vbox/vbox_tmpl.c: In function 'vboxAttachDrives':
vbox/vbox_tmpl.c:3918:22: warning: variable 'accessMode' set but not used [-Wunused-but-set-variable]

- esx_vi_types.generated.c: the name implies it's generated code and I
  didn't want to dive into the code generator

esx/esx_vi_types.generated.c: In function 'esxVI_FileQueryFlags_Free':
esx/esx_vi_types.generated.c:1203:3: warning: variable 'item' set but not used [-Wunused-but-set-variable]

14 years agoIntroduce virDomainChrDefNew()
Michal Novotny [Thu, 14 Apr 2011 16:05:14 +0000 (18:05 +0200)]
Introduce virDomainChrDefNew()

Make: passed
Make check: passed
Make syntax-check: passed

this is the commit to introduce the function to create new character
device definition for the domain as advised by Cole Robinson
<crobinso@redhat.com>.

The function is used on the relevant places and also new tests has
been added.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
14 years agoSpice: support audio, images and stream compression
Michal Privoznik [Thu, 14 Apr 2011 08:44:20 +0000 (10:44 +0200)]
Spice: support audio, images and stream compression

This extends the SPICE XML to allow variable compression settings for audio,
images and streaming:
    <graphics type='spice' port='5901' tlsPort='-1' autoport='yes'>
        <image compression='auto_glz'/>
        <jpeg compression='auto'/>
        <zlib compression='auto'/>
        <playback compression='on'/>
    </graphics>

All new elements are optional.

14 years agofree cpumask of vcpupinDef
Hu Tao [Thu, 14 Apr 2011 03:34:26 +0000 (11:34 +0800)]
free cpumask of vcpupinDef

cpumask doesn't get freed when vcpupinDef being freed, this leaks
memory.

14 years agoesx: Make the parsed URI part of the private connection data
Matthias Bolte [Sun, 10 Apr 2011 15:18:32 +0000 (17:18 +0200)]
esx: Make the parsed URI part of the private connection data

This will be used to make esxVI_Context clonable.

Also move cleanup code for esxPrivate to esxFreePrivate().

14 years agoesx: Mark error message in macros for translation
Matthias Bolte [Sun, 10 Apr 2011 11:28:29 +0000 (13:28 +0200)]
esx: Mark error message in macros for translation

14 years agoesx: Extend VI generator to cover managed object types
Matthias Bolte [Sun, 10 Apr 2011 11:27:56 +0000 (13:27 +0200)]
esx: Extend VI generator to cover managed object types

Generate lookup functions for managed object types.

14 years agoesx: Cleanup and refactor CastFromAnyType macros
Matthias Bolte [Sun, 10 Apr 2011 11:27:19 +0000 (13:27 +0200)]
esx: Cleanup and refactor CastFromAnyType macros

Add CastFromAnyType functions for the String type.

14 years agoesx: Cleanup VI generator code
Matthias Bolte [Sun, 10 Apr 2011 11:26:47 +0000 (13:26 +0200)]
esx: Cleanup VI generator code

14 years agonetwork: Fix NULL dereference during error recovery
Michal Privoznik [Thu, 14 Apr 2011 12:03:46 +0000 (14:03 +0200)]
network: Fix NULL dereference during error recovery

This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=696660

While starting a network, if brSetForwardDelay() fails, we go to err1
where we want to access macTapIfName variable which was just
VIR_FREE'd a few lines above. Instead, keep macTapIfName until we are
certain of success.

14 years agodocs: Serial and parallel device target ports actually start from 0
Matthias Bolte [Sun, 10 Apr 2011 13:03:42 +0000 (15:03 +0200)]
docs: Serial and parallel device target ports actually start from 0

Reported by Igor Galić

14 years agoAdd missing checks for QEMU domain state in tunables APIs
Daniel P. Berrange [Fri, 18 Mar 2011 15:08:19 +0000 (15:08 +0000)]
Add missing checks for QEMU domain state in tunables APIs

The methods qemuDomain{Get,Set}{Memory,Blkio,Scheduler}Parameters
all forgot to do a check on virDomainIsActive(), resulting in bogus
error messages from later parts of their impl

* src/qemu/qemu_driver.c: Add missing checks on virDomainIsActive()

14 years agophyp: Fix too small buffer allocation in phypAttachDevice
Matthias Bolte [Sat, 9 Apr 2011 09:59:10 +0000 (11:59 +0200)]
phyp: Fix too small buffer allocation in phypAttachDevice

sizeof(domain->name) is the wrong thing. Instead of using strdup here
rewrite escape_specialcharacters to allocate the buffer itself.

Add a contains_specialcharacters to be used in phypOpen, as phypOpen is
not interested in the escaped version.

14 years agophyp: Don't overwrite error from virDomainDeviceDefParse by OOM error
Matthias Bolte [Sat, 9 Apr 2011 09:59:11 +0000 (11:59 +0200)]
phyp: Don't overwrite error from virDomainDeviceDefParse by OOM error

14 years agophyp: Don't try to use a string from a failed virAsprintf
Matthias Bolte [Sat, 9 Apr 2011 09:59:09 +0000 (11:59 +0200)]
phyp: Don't try to use a string from a failed virAsprintf

14 years agophyp: Reduce code duplication in error and success paths
Matthias Bolte [Sat, 9 Apr 2011 09:59:08 +0000 (11:59 +0200)]
phyp: Reduce code duplication in error and success paths

Also fix memory leaks along the way in phypCreateServerSCSIAdapter and
phypAttachDevice.

14 years agophyp: Remove stack allocating a 4kb volume key and fix related memory leaks
Matthias Bolte [Sat, 9 Apr 2011 09:59:07 +0000 (11:59 +0200)]
phyp: Remove stack allocating a 4kb volume key and fix related memory leaks

Don't pre-allocate 4kb per key, make phypVolumeGetKey allocate the memory.

Make phypBuildVolume return the volume key instead of using pre-allocated
memory to store it.

Also fix a memory leak in phypVolumeLookupByName when phypVolumeGetKey
fails. Fix another memory leak in phypVolumeLookupByPath in the success
path. Fix phypVolumeGetXMLDesc leaking voldef.key.

14 years agoRemove C99 variable declare in PHYP network driver
Daniel P. Berrange [Wed, 13 Apr 2011 18:10:52 +0000 (19:10 +0100)]
Remove C99 variable declare in PHYP network driver

Move the virInterfacePtr declaration to the top of the
function to avoid jump uninitialized variable warnings

* src/phyp/phyp_driver.c: Fix var declaration

14 years agoReplace REMOTE_DEBUG with VIR_DEBUG in daemon dispatcher
Daniel P. Berrange [Wed, 13 Apr 2011 15:10:01 +0000 (16:10 +0100)]
Replace REMOTE_DEBUG with VIR_DEBUG in daemon dispatcher

The daemon dispatcher code had an obsolete macro

  #define REMOTE_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__)

This can be trivially removed

* daemon/remote.c: s/REMOTE_DEBUG/VIR_DEBUG/

14 years agoAdd missing checks for whether the connection is open in dispatcher
Daniel P. Berrange [Tue, 12 Apr 2011 16:33:49 +0000 (17:33 +0100)]
Add missing checks for whether the connection is open in dispatcher

Many functions did not check for whether a connection was
open. Replace the macro which obscures control flow, with
explicit checks, and ensure all dispatcher code has checks.

* daemon/remote.c: Add connection checks

14 years agoStandard on error variable name in libvirtd dispatcher
Daniel P. Berrange [Wed, 13 Apr 2011 14:49:09 +0000 (15:49 +0100)]
Standard on error variable name in libvirtd dispatcher

Some dispatcher methods have a parameter

            remote_error *err,

Instead of the more normal

            remote_error *rerr,

* daemon/remote.c: s/err/rerr/

14 years agoRemove all whitespace before function brackets in daemon dispatcher
Daniel P. Berrange [Tue, 12 Apr 2011 16:34:30 +0000 (17:34 +0100)]
Remove all whitespace before function brackets in daemon dispatcher

A lot of code in libvirtd's dispatcher used the style

    dom = get_nonnull_domain (conn, args->dom);

Instead of the normal libvirt style

    dom = get_nonnull_domain(conn, args->dom);

* daemon/remote.c: Remove all whitelist before function brackets

14 years agoPHYP: Adding network interface
Eduardo Otubo [Mon, 28 Mar 2011 20:07:20 +0000 (17:07 -0300)]
PHYP: Adding network interface

This is the implementation of the previous patch now using virInterface*
API. Ended up this patch got much more simpler, smaller and easier to
review. Here is some details:

  * MAC size and interface name are fixed due to specifications on HMC,
    both are created automatically and CAN'T be specified from user. They
    have the following format:

     * MAC: 122980003002
     * Interface name: U9124.720.067BE8B-V3-C0

  * I did replaced all the |grep|sed following the comments Eric Blake
    did on the last patch.

  * According to my last email, It's not possible to create a network
    interface without assigning it to a specific lpar. Then, I am using
    this very minimalistic XML file for testing:

     <interface type='ethernet' name='LPAR01'>
     </interface>

    In this file I am using "name" as the lpar name which I am going to
    assign the new network interface. I couldn't find a better way to
    refer to it. Comments are welcome.

  * Regarding the fact I am sleeping one second waiting for the HMC to
    complete creation of the interface, I don't have means to check
    if the whole process is done. All I do is execute a command, wait
    until is complete (which is not enough in this case) check
    the return and the exit status. The process of actually creating
    a networking interface seems to take a little longer than just the
    return of the ssh control.

14 years agoqemu: fix a dead-lock problem
Hu Tao [Tue, 12 Apr 2011 10:29:27 +0000 (18:29 +0800)]
qemu: fix a dead-lock problem

In qemuDomainObjBeginJobWithDriver, when virCondWaitUntil timeouts,
the function tries to call qemuDriverLock with virDomainObj locked,
this causes the dead-lock problem. This patch fixes this.

14 years agoutil: Fix crash when removing entries during hash iteration
Jiri Denemark [Tue, 12 Apr 2011 15:58:22 +0000 (17:58 +0200)]
util: Fix crash when removing entries during hash iteration

Commit 9677cd33eea4c65d78ba463b46b8b45ed2da1709 made it possible to
remove current entry when iterating through all hash entries. However,
it didn't properly handle a special case of removing first entry
assigned to a given key which contains several entries in its collision
list.

14 years agoFix possible infinite loop in remote driver
Michal Privoznik [Tue, 12 Apr 2011 14:58:48 +0000 (16:58 +0200)]
Fix possible infinite loop in remote driver

When we take out completed calls from queue we might end up
in circular pointer. We don't want pointer to previous item
point to element taken out.

14 years agomaint: fix grammar errors
Eric Blake [Mon, 11 Apr 2011 22:25:25 +0000 (16:25 -0600)]
maint: fix grammar errors

Jim Meyering recently improved gnulib to catch various grammar
errors during 'make syntax-check'.

* .gnulib: Update to latest, for syntax-check improvements.
* include/libvirt/libvirt.h.in (virConnectAuthCallbackPtr): Use
cannot rather than two words.
* src/driver.c: Likewise.
* src/driver.h (VIR_SECRET_GET_VALUE_INTERNAL_CALL): Likewise.
* src/remote/remote_driver.c (initialize_gnutls): Likewise.
* src/util/pci.c (pciBindDeviceToStub): Likewise.
* src/storage/storage_backend.c (virStorageBackendCreateQemuImg):
Likewise.
(virStorageBackendUpdateVolTargetInfoFD): Avoid doubled word.
* docs/formatdomain.html.in: Likewise.
* src/qemu/qemu_process.c (qemuProcessStart): Likewise.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_can_not)
(exclude_file_name_regexp--sc_prohibit_doubled_word): Exclude
existing translation problems.

14 years agodocs: document freecell --all
Eric Blake [Wed, 6 Apr 2011 17:27:06 +0000 (11:27 -0600)]
docs: document freecell --all

Based on a smaller patch developed by Moritoshi Oshiro:
https://bugzilla.redhat.com/show_bug.cgi?id=693963

* tools/virsh.pod (freecell): Mention all, and clarify that
optional cellno requires --cellno.

14 years agoxen: Remove PATH_MAX sized stack allocation from block stats code
Matthias Bolte [Sat, 9 Apr 2011 10:03:44 +0000 (12:03 +0200)]
xen: Remove PATH_MAX sized stack allocation from block stats code

14 years agosetmaxmem: add the new options to "virsh setmaxmem" command
Taku Izumi [Fri, 8 Apr 2011 05:08:52 +0000 (14:08 +0900)]
setmaxmem: add the new options to "virsh setmaxmem" command

This patch adds the new options (--live, --config, and --current) to
"virsh setmaxmem" command. The behavior of above options is the same
as that of "virsh setmem".  When the --config option is specified, a
modification is effective for the persistent domain, while the --live
option is specified, a modification is effective for an active
domain. The --current option is specified, it affects a current
domain.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agomaxmem: implement virDomainSetMaxMemory API of the qemu driver
Taku Izumi [Fri, 8 Apr 2011 05:08:13 +0000 (14:08 +0900)]
maxmem: implement virDomainSetMaxMemory API of the qemu driver

This patch implements the code to support virDomainSetMaxMemory API,
and to support VIR_DOMAIN_MEM_MAXIMUM flag in qemudDomainSetMemoryFlags function.
As a result, we can change the maximum memory size of inactive QEMU guests.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agomaxmem: introduces VIR_DOMAIN_MEM_MAXIMUM flag
Taku Izumi [Fri, 8 Apr 2011 05:07:27 +0000 (14:07 +0900)]
maxmem: introduces VIR_DOMAIN_MEM_MAXIMUM flag

This patch introduces VIR_DOMAIN_MEM_MAXIMUM flag.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agodocs: remove "returns" word from beginning of lines
Jean-Baptiste Rouault [Thu, 7 Apr 2011 08:47:44 +0000 (10:47 +0200)]
docs: remove "returns" word from beginning of lines

Move "returns" keyword from beginning of API doc lines
when it does not describe return values.
Maybe the API doc extractor could be changed to look for
"returns: " to avoid such confusion.

14 years agobuild: really fix mingw startup
Eric Blake [Fri, 8 Apr 2011 19:00:09 +0000 (13:00 -0600)]
build: really fix mingw startup

Aargh; commit 8ae5dfd still didn't fix the mingw problem, because
gnulib defined O_NONBLOCK to 0 for just mingw.  I've now fixed
that in gnulib, but we need the latest pipe2 for libvirt to work.

* .gnulib: Update to latest, for pipe2 fixes.

14 years agobuild: fix mingw build
Eric Blake [Fri, 8 Apr 2011 15:08:53 +0000 (09:08 -0600)]
build: fix mingw build

Commit 02c39a2 introduced a mingw build regression, due to a
regression in gnulib's areadlink module:

../../../gnulib/lib/careadlinkat.c: In function 'careadlinkat':
../../../gnulib/lib/careadlinkat.c:143:39: error: 'const struct allocator' has no member named 'malloc'

* .gnulib: Update to latest, for careadlinkat fix.

14 years agodocs: tweak virsh restore warning
Eric Blake [Thu, 7 Apr 2011 15:01:18 +0000 (09:01 -0600)]
docs: tweak virsh restore warning

* tools/virsh.pod: Fix grammar, and clarify wording.
* src/qemu/qemu_driver.c (qemudDomainObjStart): Drop redundant
condition.

14 years agodo not build libvirt_iohelper when building without libvirtd
Wen Congyang [Fri, 8 Apr 2011 03:26:47 +0000 (11:26 +0800)]
do not build libvirt_iohelper when building without libvirtd

The libexec program libvirt_iohelper is only for libvirtd. If we build rpm
without libvirtd, we will receive the following messages:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/wency/rpmbuild/BUILDROOT/libvirt-0.9.0-1.el6.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/libexec/libvirt_iohelper

14 years agonwfilters: support for TCP flags evaluation
Stefan Berger [Fri, 8 Apr 2011 00:13:38 +0000 (20:13 -0400)]
nwfilters: support for TCP flags evaluation

This patch adds support for the evaluation of TCP flags in nwfilters.

It adds documentation to the web page and extends the tests as well.
Also, the nwfilter schema is extended.

The following are some example for rules using the tcp flags:

<rule action='accept' direction='in'>
    <tcp state='NONE' flags='SYN/ALL' dsptportstart='80'/>
</rule>
<rule action='drop' direction='in'>
    <tcp state='NONE' flags='SYN/ALL'/>
</rule>

14 years agosetmem: add --current option to virsh setmem command
Taku Izumi [Wed, 23 Mar 2011 05:49:28 +0000 (14:49 +0900)]
setmem: add --current option to virsh setmem command

This patch adds the new option (--current) to the "virsh setmem" command.
When --current option is specified, it affects a "current" domain.
The word "current" denotes that if a domain is running, it affects
a running domain only; otherwise it affects a persistent domain.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agosetmem: add VIR_DOMAIN_MEM_CURRENT support to qemu
Taku Izumi [Wed, 23 Mar 2011 05:48:24 +0000 (14:48 +0900)]
setmem: add VIR_DOMAIN_MEM_CURRENT support to qemu

This patch adds virDomainSetMemoryFlags(,,VIR_DOMAIN_MEM_CURRENT) support
code to qemu driver.

Also, change virDomainObjIsActive to return bool, given its usage.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agosetmem: introduce VIR_DOMAIN_MEM_CURRENT flag
Taku Izumi [Wed, 23 Mar 2011 05:47:21 +0000 (14:47 +0900)]
setmem: introduce VIR_DOMAIN_MEM_CURRENT flag

This patch introduces VIR_DOMAIN_MEM_CURRENT flag and
modifies virDomainSetMemoryFlags function to support it.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agobuild: Install libxenlight log dir
Jim Fehlig [Thu, 7 Apr 2011 22:01:58 +0000 (16:01 -0600)]
build: Install libxenlight log dir

Add $localstatedir/log/libvirt/libxl when building libxenlight driver

14 years agosetmaxmem: remove the code to invoke virDomainSetMemory in cmdSetmaxmem
Taku Izumi [Wed, 16 Mar 2011 08:58:57 +0000 (17:58 +0900)]
setmaxmem: remove the code to invoke virDomainSetMemory in cmdSetmaxmem

When the new maximum memory size becomes less than the current memory size,
I think it is not the libvirt client but the each driver that decides the behavior
(reject the operation or shrink the current memory size).

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
14 years agovirsh: fix mingw startup
Eric Blake [Wed, 6 Apr 2011 14:10:28 +0000 (08:10 -0600)]
virsh: fix mingw startup

* .gnulib: Update to latest, for pipe2.
* bootstrap.conf (gnulib_modules): Add pipe2.
* src/util/event_poll.c (virEventPollInit): Use it, to avoid
problematic virSetCloseExec on mingw.

14 years agobuild: fix gitignore sorting
Eric Blake [Tue, 5 Apr 2011 19:06:31 +0000 (13:06 -0600)]
build: fix gitignore sorting

Make it so we don't have to 'git add -f' particular files like
po/POTFILES.in all the time (tested by fixing one of our
special-case files as part of the patch).

* .gnulib: Update to latest.
* bootstrap: Resync from coreutils.
* .gitignore: Sort whitelist entries correctly, including ignoring
files rather than directories.
* m4/virt-compile-warnings.m4: Convert tabs to space.

14 years agodocs: add an IPv6 address to network XML examples
Laine Stump [Thu, 7 Apr 2011 14:50:43 +0000 (10:50 -0400)]
docs: add an IPv6 address to network XML examples

It was just pointed out that, although I added documentation for the
IPv6 additions to the network XML, I neglected to use those additions
in the examples. This patch adds an IPv6 address to each of the
examples except for the "default" network, since that is a faithful
reproduction of the default network config that's automatically
installed, which doesn't include any IPv6 address (for good reason -
because there is no such thing as IPv6 NAT, there is no one IPv6
address that would work for all installations).

14 years agoAdd domainSet/GetSchedulerParameters to libxl driver
Markus Groß [Wed, 6 Apr 2011 08:58:40 +0000 (10:58 +0200)]
Add domainSet/GetSchedulerParameters to libxl driver

Libxenlight currently only supports the credit scheduler.
Therefore setting or getting a parameter of other
schedulers raise an error (for now).

14 years agoqemu: Remove the managed state file only if restoring succeeded
Osier Yang [Thu, 7 Apr 2011 08:58:26 +0000 (16:58 +0800)]
qemu: Remove the managed state file only if restoring succeeded

1) Both "qemuDomainStartWithFlags" and "qemuAutostartDomain" try to
restore the domain from managedsave'ed image if it exists (by
invoking "qemuDomainObjRestore"), but it unlinks the image even
if restoring fails, which causes data loss. (This problem exists
for "virsh managedsave dom; virsh start dom").

The fix for is to unlink the managed state file only if restoring
succeeded.

2) For "virsh save dom; virsh restore dom;", it can cause data
corruption if one reuse the saved state file for restoring. Add
doc to tell user about it.

3) In "qemuDomainObjStart", if "managed_save" is NULL, we shouldn't
fallback to start the domain, skipping it to cleanup as a incidental
fix. Discovered by Eric.

14 years agoreattach pci devices when qemuPrepareHostdevPCIDevices() failed
Wen Congyang [Mon, 28 Mar 2011 07:01:19 +0000 (15:01 +0800)]
reattach pci devices when qemuPrepareHostdevPCIDevices() failed

Reattach all pci devices that we detached when qemuPrepareHostdevPCIDevices()
failed.

14 years agoreattach pci device when pciBindDeviceToStub() failed
Wen Congyang [Wed, 6 Apr 2011 07:13:14 +0000 (15:13 +0800)]
reattach pci device when pciBindDeviceToStub() failed

We should bind pci device to original driver when pciBindDeviceToStub() failed.
If the pci device is not bound to any driver before calling pciBindDeviceToStub(),
we should only unbind it from pci-stub. If it is bound to pci-stub, we should not
unbind it from pci-stub.

14 years agorename pciUnBindDeviceFromStub() to pciUnbindDeviceFromStub() and float it up
Wen Congyang [Wed, 6 Apr 2011 07:13:10 +0000 (15:13 +0800)]
rename pciUnBindDeviceFromStub() to pciUnbindDeviceFromStub() and float it up

This patch do the following things:
1. rename the function as 'Unbind' is better than 'UnBind'.
2. pciUnbindDeviceFromStub() will be used in the function pciBindDeviceToStub() in
   next patch. Float it up, instead of having to have a forward declaration

14 years agoremove devices from driver->activePciHostdevs when qemuPrepareHostdevPCIDevices(...
Wen Congyang [Mon, 28 Mar 2011 07:01:14 +0000 (15:01 +0800)]
remove devices from driver->activePciHostdevs when qemuPrepareHostdevPCIDevices() failed

We should not mark pci devices as active when qemuPrepareHostdevPCIDevices()
failed.

14 years agopci: avoid invalid free, init path to NULL
Wen Congyang [Wed, 6 Apr 2011 06:21:00 +0000 (14:21 +0800)]
pci: avoid invalid free, init path to NULL

This bug was introduce by commit 57162db8, and it will cause libvirtd crashed.

14 years agobuild: avoid compiler warning on cygwin
Eric Blake [Wed, 6 Apr 2011 23:02:53 +0000 (17:02 -0600)]
build: avoid compiler warning on cygwin

In file included from util/threads.c:31:
util/threads-pthread.c: In function 'virThreadSelfID':
util/threads-pthread.c:214: warning: cast from function call of type 'pthread_t' to non-matching type 'int' [-Wbad-function-cast]

* src/util/threads-pthread.c (virThreadSelfID) [!SYS_gettid]:
Add intermediate cast to silence gcc.

14 years agoAdd domainIsUpdated to libxl driver
Markus Groß [Wed, 6 Apr 2011 08:58:39 +0000 (10:58 +0200)]
Add domainIsUpdated to libxl driver

14 years agoFix build for older gcc
Jim Fehlig [Wed, 6 Apr 2011 21:05:45 +0000 (15:05 -0600)]
Fix build for older gcc

With gcc 4.3.4 I'm seeing the following warning failure

cc1: warnings being treated as errors
cc1: error: -funit-at-a-time is required for inlining of functions
that are only called once [-Wdisabled-optimization]

Add -funit-at-a-time to WARN_CFLAGS.

14 years agoChange locking for udev monitor and callbacks
Serge Hallyn [Tue, 5 Apr 2011 21:14:17 +0000 (16:14 -0500)]
Change locking for udev monitor and callbacks

We're seeing bugs apparently resulting from thread unsafety of
libpciaccess, such as
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/726099
To prevent those, as suggested by danpb on irc, move the
nodeDeviceLock(driverState) higher into the callers.  In
particular:

  udevDeviceMonitorStartup should hold the lock while calling
  udevEnumerateDevices(), and udevEventHandleCallback should hold it
  over its entire execution.

It's not clear to me whether it is ok to hold the
nodeDeviceLock while taking the virNodeDeviceObjLock(dev) on a
device.  If not, then the lock will need to be dropped around
the calling of udevSetupSystemDev(), and udevAddOneDevice()
may not actually be safe to call from higher layers with the
driverstate lock held.

libvirt 0.8.8 with this patch on it seems to work fine for me.
Assuming it looks ok and I haven't done anything obviously dumb,
I'll ask the bug submitters to try this patch.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
14 years agotests: fix recent test failures
Eric Blake [Wed, 6 Apr 2011 16:05:14 +0000 (10:05 -0600)]
tests: fix recent test failures

* tests/qemuxml2argvdata/qemuxml2argv-*.args: Reflect reserved VGA
port change.

14 years agoqemu: Support for overriding NPROC limit
Jiri Denemark [Tue, 5 Apr 2011 12:17:28 +0000 (14:17 +0200)]
qemu: Support for overriding NPROC limit

This patch adds max_processes option to qemu.conf which can be used to
override system default limit on number of processes that are allowed to
be running for qemu user.

14 years agoqemu: Always reserves slot 0x02 for primary VGA.
Osier Yang [Tue, 5 Apr 2011 13:49:58 +0000 (21:49 +0800)]
qemu: Always reserves slot 0x02 for primary VGA.

To address https://bugzilla.redhat.com/show_bug.cgi?id=692355

This fix is to reserve slot 0x02 for primary VGA even if there
is no "video" specified in domain XML to avoid the problem.

14 years agolibxl: avoid compiler warning
Eric Blake [Tue, 5 Apr 2011 16:07:57 +0000 (10:07 -0600)]
libxl: avoid compiler warning

cc1: warnings being treated as errors
libxl/libxl_driver.c: In function 'libxlDomainSetVcpusFlags':
libxl/libxl_driver.c:1570:14: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]
libxl/libxl_driver.c:1578:15: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]

This was the only use of floor() and ceil(), and floating-point
is overkill for power-of-two manipulations.

* src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Avoid -lm
for trivial computations.

14 years agoFix typo in systemtap tapset directory name
Daniel P. Berrange [Tue, 5 Apr 2011 15:18:37 +0000 (16:18 +0100)]
Fix typo in systemtap tapset directory name

The systemtap directory for tapsets is called

  /usr/share/systemtap/tapset

Not

 /usr/share/systemtap/tapsets

* daemon/Makefile.am,libvirt.spec.in: s/tapsets/tapset/

14 years agoDon't try to enable stack protector on Win32
Daniel P. Berrange [Tue, 5 Apr 2011 15:00:58 +0000 (16:00 +0100)]
Don't try to enable stack protector on Win32

The GCC Win32 compiler will claim to support -fstack-protector,
but if it actually gets triggered by a suitable code pattern,
linking will fail. Other non-Linux OS likely suffer the same
way with gcc.

* m4/virt-compile-warnings.m4: Only use stack protector when
  the build target is Linux.

14 years agoAvoid compiler warnings about int -> void * casts
Daniel P. Berrange [Tue, 5 Apr 2011 14:59:17 +0000 (15:59 +0100)]
Avoid compiler warnings about int -> void * casts

GCC is a little confused about the cast of beginthread/beginthreadex
from unsigned long -> void *. Go via an intermediate variable avoids
the bogus warning, and makes the code a little cleaner

* src/util/threads-win32.c: Avoid compiler warning in cast

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

The SCSI volumes get a better 'key' field based on the fully
qualified volume path. All SCSI volumes have a unique serial
available in hardware which can be obtained by sending a
suitable SCSI command. Call out to udev's 'scsi_id' command
to fetch this value

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

14 years agoqemu: Ignore unusable binaries
Jiri Denemark [Mon, 4 Apr 2011 13:01:22 +0000 (15:01 +0200)]
qemu: Ignore unusable binaries

When initializing qemu guest capabilities, we should ignore qemu
binaries that we are not able to extract version/help info from since
they will be unusable for creating domains anyway. Ignoring them is also
much better than letting initialization of qemu driver fail.

14 years agoqemu: Rewrite LOOKUP_PTYS macro into a function
Jiri Denemark [Wed, 30 Mar 2011 09:07:59 +0000 (11:07 +0200)]
qemu: Rewrite LOOKUP_PTYS macro into a function

The macro is huge and gives us nothing but headache when maintaining it.

14 years agoEnable use of -Wold-style-definition compiler flag
Daniel P. Berrange [Fri, 16 Jul 2010 16:30:00 +0000 (17:30 +0100)]
Enable use of -Wold-style-definition compiler flag

A couple of functions were declared using the old style foo()
for no-parameters, instead of foo(void)

* src/xen/xen_hypervisor.c, tests/testutils.c: Replace () with (void)
  in some function declarations
* m4/virt-compile-warnings.m4: Enable -Wold-style-definition

14 years agoEnable use of -Wmissing-noreturn
Daniel P. Berrange [Fri, 16 Jul 2010 16:16:19 +0000 (17:16 +0100)]
Enable use of -Wmissing-noreturn

* src/internal.h: Define a ATTRIBUTE_NO_RETURN annotation
* src/lxc/lxc_container.c: Annotate lxcContainerDummyChild
  with ATTRIBUTE_NO_RETURN
* tests/eventtest.c: Mark async thread as ATTRIBUTE_NO_RETURN
* m4/virt-compile-warnings.m4: Enable -Wmissing-noreturn

14 years agoEnable -Wmissing-format-attribute warning
Daniel P. Berrange [Fri, 16 Jul 2010 15:38:10 +0000 (16:38 +0100)]
Enable -Wmissing-format-attribute warning

Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations

* tools/virsh.c, tests/testutils.c: Add printf format attribute
* m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute

14 years agoRemove acinclude.m4 file
Daniel P. Berrange [Mon, 4 Apr 2011 13:40:34 +0000 (14:40 +0100)]
Remove acinclude.m4 file

Split the bit acinclude.m4 file into smaller pieces named
as m4/virt-XXXXX.m4

* .gitignore: Ignore gettext related files
* acinclude.m4: Delete
* m4/virt-compile-warnings.m4: Checks for GCC compiler flags
* m4/virt-pkgconfig-back-compat.m4: Backcompat check for
  pkgconfig program

14 years agoUse gnulib's manywarnings & warnings modules
Daniel P. Berrange [Fri, 16 Jul 2010 15:04:05 +0000 (16:04 +0100)]
Use gnulib's manywarnings & warnings modules

Remove custom code for checking compiler warnings, using
gl_WARN_ADD instead. Don't list all flags ourselves, use
gnulib's gl_MANYWARN_ALL_GCC to get all possible GCC flags,
then turn off the ones we don't want yet.

* acinclude.m4: Rewrite to use gl_WARN_ADD and gl_MANYWARN_ALL_GCC
* bootstrap.conf: Add warnings & manywarnings
* configure.ac: Switch to gl_WARN_ADD
* m4/compiler-flags.m4: Obsoleted by gl_WARN_ADD

14 years agoRemove possible uninitialized variable in openvz driver
Daniel P. Berrange [Tue, 5 Apr 2011 09:54:59 +0000 (10:54 +0100)]
Remove possible uninitialized variable in openvz driver

* src/openvz/openvz_driver.c: Initialize saveptr variable