]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
14 years agofree memory properly in cleanup patch
Hu Tao [Tue, 26 Apr 2011 01:20:31 +0000 (09:20 +0800)]
free memory properly in cleanup patch

virsh schedinfo inactive-domain will trigger the problem.

14 years agofree buf->content when vsnprintf() failed
Wen Congyang [Wed, 27 Apr 2011 05:43:24 +0000 (13:43 +0800)]
free buf->content when vsnprintf() failed

When buf->error is 1, we do not return buf->content in the function
virBufferContentAndReset(). So we should free buf->content when
vsnprintf() failed.

14 years agoesx: Fix dynamic dispatch for CastFromAnyType functions
Matthias Bolte [Mon, 25 Apr 2011 10:38:17 +0000 (12:38 +0200)]
esx: Fix dynamic dispatch for CastFromAnyType functions

This was broken by the refactoring in ac1e6586ec75. It resulted in a
segfault for 'virsh vol-dumpxml' and related volume functions.

Before the refactoring all users of the ESX_VI__TEMPLATE__DISPATCH
macro dispatched on the item type, as the item is the input to all those
functions.

Commit ac1e6586ec75 made the dynamically dispatched CastFromAnyType
functions use this macro too, but this functions dispatched on the
actual type of the AnyType object. The item is the output of the
CastFromAnyType functions.

This difference was missed in the refactoring, making CastFromAnyType
functions dereferencing the item pointer that is NULL at the time of
the dispatch.

14 years agoMove call to virReportOOMError into virFileBuildPath
Matthias Bolte [Sun, 24 Apr 2011 09:48:00 +0000 (11:48 +0200)]
Move call to virReportOOMError into virFileBuildPath

Suggested by Daniel P. Berrange

14 years agobuild: use gnulib passfd for simpler SCM_RIGHTS code
Eric Blake [Wed, 20 Apr 2011 19:56:50 +0000 (13:56 -0600)]
build: use gnulib passfd for simpler SCM_RIGHTS code

* .gnulib: Update to latest for passfd fixes.
* bootstrap.conf (gnulib_modules): Add passfd.
* src/util/util.c (virFileOpenAs): Simplify.

14 years agoqemu: Add flags checking in DomainCoreDump
Jiri Denemark [Fri, 22 Apr 2011 10:02:39 +0000 (12:02 +0200)]
qemu: Add flags checking in DomainCoreDump

14 years agoMake crash and live flags mutually exclusive in virDomainCoreDump
Mark Wu [Fri, 22 Apr 2011 09:45:33 +0000 (11:45 +0200)]
Make crash and live flags mutually exclusive in virDomainCoreDump

They don't make any sense when used together.

14 years agoMake sure DNSMASQ_STATE_DIR exists
Guido Günther [Sat, 23 Apr 2011 12:28:44 +0000 (14:28 +0200)]
Make sure DNSMASQ_STATE_DIR exists

otherwise the directory returned by networkDnsmasqLeaseFileName will not
be created if ipdef->nhosts == 0 in networkBuildDnsmasqArgv.

14 years agoFix small memory leaks in config parsing related functions
Matthias Bolte [Sun, 24 Apr 2011 18:00:30 +0000 (20:00 +0200)]
Fix small memory leaks in config parsing related functions

Found by 'make -C tests valgrind'.

xen_xm.c: Dummy allocation via virDomainChrDefNew is directly
overwritten and lost. Free 'script' in success path too.

vmx.c: Free virtualDev_string in success path too.

domain_conf.c: Free compression in success path too.

14 years agoAdd virDomainEventRebootNew
Matthias Bolte [Mon, 25 Apr 2011 11:35:23 +0000 (13:35 +0200)]
Add virDomainEventRebootNew

This will be used in the ESX driver event handling.

14 years agobuild: make VIR_FREE do some type checking
Eric Blake [Sat, 23 Apr 2011 02:15:50 +0000 (20:15 -0600)]
build: make VIR_FREE do some type checking

We can exploit the fact that gcc warns about int-to-pointer conversion
in ternary cond?(void*):(int) in order to prevent future mistakes of
calling VIR_FREE on a scalar lvalue.  For example, between commits
158ba873 and 802e2df, we would have had this warning:

cc1: warnings being treated as errors
remote.c: In function 'remoteDispatchListNetworks':
remote.c:3684:70: error: pointer/integer type mismatch in conditional expression

There are still a number of places that malloc into a const char*;
while it would probably be worth scrubbing them to use char*
instead, that is a separate patch, so we have to cast away const
in VIR_FREE for now.

* src/util/memory.h (VIR_FREE): Make gcc warn about integers.
Iteratively developed from a patch by Christophe Fergeau.

14 years agothreads: add one-time initialization support
Eric Blake [Wed, 20 Apr 2011 22:26:00 +0000 (16:26 -0600)]
threads: add one-time initialization support

mingw lacks the counterpart to PTHREAD_MUTEX_INITIALIZER, so the
best we can do is portably expose once-only runtime initialization.

* src/util/threads.h (virOnceControlPtr): New opaque type.
(virOnceFunc): New callback type.
(virOnce): New prototype.
* src/util/threads-pthread.h (virOnceControl): Declare.
(VIR_ONCE_CONTROL_INITIALIZER): Define.
* src/util/threads-win32.h (virOnceControl)
(VIR_ONCE_CONTROL_INITIALIZER): Likewise.
* src/util/threads-pthread.c (virOnce): Implement in pthreads.
* src/util/threads-win32.c (virOnce): Implement in WIN32.
* src/libvirt_private.syms: Export it.

14 years agoesx: Add a wrapper for shared CURL handles
Matthias Bolte [Sat, 19 Feb 2011 14:27:16 +0000 (15:27 +0100)]
esx: Add a wrapper for shared CURL handles

To be used to share a CURL handle between multiple threads in the
upcoming domain event support.

14 years agoesx: Move CURL handling code to it's own type
Matthias Bolte [Sat, 19 Feb 2011 13:34:25 +0000 (14:34 +0100)]
esx: Move CURL handling code to it's own type

14 years agodaemon: Don't try to free an unsigned int in error paths
Matthias Bolte [Fri, 22 Apr 2011 09:05:38 +0000 (11:05 +0200)]
daemon: Don't try to free an unsigned int in error paths

14 years agodaemon: Honor error variable name change in the generator
Matthias Bolte [Fri, 22 Apr 2011 09:01:15 +0000 (11:01 +0200)]
daemon: Honor error variable name change in the generator

Commit 36b652138be renamed err to rerr, do the same in the generator.

14 years agolibvirt/qemu - clean up UpdateDevice for consolidation.
KAMEZAWA Hiroyuki [Thu, 21 Apr 2011 07:25:46 +0000 (16:25 +0900)]
libvirt/qemu - clean up UpdateDevice for consolidation.

This patch strips reusable part of qemuDomainUpdateDeviceFlags()
and consolidate it to qemuDomainModifyDeviceFlags().
No functional changes.

* src/qemu/qemu_driver.c
(qemuDomainChangeDiskMediaLive) : pulled out code for updating disks.
(qemuDomainUpdateDeviceLive) : core of UpdateDevice, extracted from
UpdateDeviceFlags()
(qemuDomainModifyDeviceFlags): add support for updating device in live domain.
(qemuDomainUpdateDeviceFlags): reworked as a wrapper function of
qemuDomainModifyDeviceFlags()

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
14 years agolibvirt/qemu - clean up At(De)tachDeviceFlags() for consolidation.
KAMEZAWA Hiroyuki [Thu, 21 Apr 2011 07:23:48 +0000 (16:23 +0900)]
libvirt/qemu - clean up At(De)tachDeviceFlags() for consolidation.

clean up At(De)tachDeviceFlags() for consolidation.

qemuDomainAttachDeviceFlags()/qemuDomainDetachFlags()/
qemuDomainUpdateDeviceFlags() has similar logics and copied codes.

This patch series tries to unify them to use shared code when it can.
At first, clean up At(De)tachDeviceFlags() and devide it into functions.

By this, this patch pulls out shared components between functions.
Based on patch series by Eric Blake, I added some modification as
switch-case with QEMU_DEVICE_ATTACH, QEMU_DEVICE_DETACH, QEMU_DEVICE_UPDATE

* src/qemu/qemu_driver.c
(qemuDomainAt(De)tachDeviceFlags) : pulled out to qemuDomainModifyDeviceFlags()
(qemuDomainModifyDeviceFlags) : implements generic code for modifying domain.
(qemuDomainAt(De)tachDeviceFlagsLive) : code for at(de)taching devices to
domain in line. no changes in logic from old code.
(qemuDomainAt(De)tachDeviceDiskLive) : for at(de)taching Disks.
(qemuDomainAt(De)tachDeviceControllerLive) : for at(de)taching Controllers

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
14 years agolibvirt/qemu - Centralize device modification in the more flexible APIs
KAMEZAWA Hiroyuki [Thu, 21 Apr 2011 07:22:30 +0000 (16:22 +0900)]
libvirt/qemu - Centralize device modification in the more flexible APIs

Centralize device modification in the more flexible APIs, to allow future
honoring of additional flags.  Explicitly reject the
VIR_DOMAIN_DEVICE_MODIFY_FORCE flag on attach/detach.

Based on Eric Blake<eblake@redhat.com>'s work.

* src/qemu/qemu_driver.c
(qemudDomainAttachDevice)(qemudDomainAttachDeviceFlags): Swap bodies,rename...
(qemudDomainDetachDevice, qemudDomainDetachDeviceFlags): Likewise.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
14 years agoAdd support for s390(x) cpu options parsing
Michal Privoznik [Thu, 21 Apr 2011 15:27:40 +0000 (17:27 +0200)]
Add support for s390(x) cpu options parsing

Up to now we missed parser for cpuinfo on x390(x) machines. Those machines
have only 1 thread, core, socket. What is missing is information about
CPU frequency.

14 years agoFix QEMU tunnelled migration FD handling
Daniel P. Berrange [Thu, 21 Apr 2011 15:02:40 +0000 (16:02 +0100)]
Fix QEMU tunnelled migration FD handling

The two ends of the pipe used for feeding QEMU tunnelled
migration data were interchanged, so QEMU got given the
"write" end instead of the "read" end.

The qemuMigrationPrepareTunnel method was also immediately
closing the "write" end of the pipe, so the stream failed
to actually write anything.

* src/qemu/qemu_migration.c: Swap tunnelled migration
  pipe FDs & don't close pipe given to stream

14 years agobuild: fix 32-bit test failure
Eric Blake [Thu, 21 Apr 2011 14:23:59 +0000 (08:23 -0600)]
build: fix 32-bit test failure

ARRAY_CARDINALITY is typed as size_t, not long; this matters on 32-bit
platforms:

hashtest.c: In function 'testHashRemoveForEach':
hashtest.c:114: error: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat]

* tests/hashtest.c (testHashRemoveForEach): Use correct format.

14 years agoRemove artificial minimum limit for guest memory
Jiri Denemark [Thu, 21 Apr 2011 10:06:41 +0000 (12:06 +0200)]
Remove artificial minimum limit for guest memory

Remove the artificial minimum of 4096 KB for guest memory. It's drivers'
job to set the limit if needed.

14 years agoPHYP: Adding reboot domain function
Eduardo Otubo [Tue, 19 Apr 2011 15:34:08 +0000 (12:34 -0300)]
PHYP: Adding reboot domain function

Adding reboot <domain> function for pHyp driver.

14 years agobuild: fix syntax-check failure
Eric Blake [Wed, 20 Apr 2011 23:00:30 +0000 (17:00 -0600)]
build: fix syntax-check failure

* .mailmap: Add an alias for last commit.

14 years agofix tunnelled migration's regression
Wen Congyang [Wed, 20 Apr 2011 10:20:12 +0000 (18:20 +0800)]
fix tunnelled migration's regression

If the migrateFrom is "stdio" not "stdin", qemuBuildCommandLine()
will convert it to exec:cat or fd:n.

14 years agonwfilter: no support for direct type of interface
Stefan Berger [Tue, 19 Apr 2011 20:23:59 +0000 (16:23 -0400)]
nwfilter: no support for direct type of interface

Ebtables filtering doesn't work on macvtap device. Remove support for direct type of interface.

14 years agovirsh: nuke use of TRUE and FALSE
Eric Blake [Mon, 18 Apr 2011 22:37:42 +0000 (16:37 -0600)]
virsh: nuke use of TRUE and FALSE

Gnulib already guarantees <stdbool.h>, so it is easier to just
use the standardized spellings.

* tools/virsh.c (vshCmdDef): Change callback to return real bool.
(__vshControl): Change several fields to bool.
(vshCommandOptBool): Change return type.
All callers updated.
* tools/Makefile.am (virsh-net-edit.c, virsh-pool-edit.c):
Likewise.

14 years agoqemu: fix the check of virDomainObjUnref()'s return value
Wen Congyang [Tue, 19 Apr 2011 02:08:21 +0000 (10:08 +0800)]
qemu: fix the check of virDomainObjUnref()'s return value

If vm is unlocked in virDomainObjUnref(), the return value is 0, not less
than 0.

14 years agoAdd cputune support to libxl driver
Markus Groß [Mon, 18 Apr 2011 09:16:33 +0000 (11:16 +0200)]
Add cputune support to libxl driver

Here is a new version of this patch:
https://www.redhat.com/archives/libvir-list/2011-April/msg00337.html

v2:
  - store the cputune info for the whole runtime of the domain
  - remove cputune info when domain is destroyed

The nodeGetInfo code had to be moved into a helper
function to reuse it without a virConnectPtr.

14 years agoUpdate and sort msg_gen_function list and mark unmarked messages
Matthias Bolte [Sun, 17 Apr 2011 06:30:49 +0000 (08:30 +0200)]
Update and sort msg_gen_function list and mark unmarked messages

Inspired by Eric Blake

14 years agophyp: another simplification
Eric Blake [Wed, 13 Apr 2011 21:27:16 +0000 (15:27 -0600)]
phyp: another simplification

Rather than copying and pasting lots of code, factor it into a
single helper function.

This commit adds a warning if tighter integer parsing would fail
due to any stray bytes after the number, but should not change
any behavior other than the bug fix for phypNumDomainsGeneric
looking only at numeric lines.

* src/phyp/phyp_driver.c (phypExecInt): New function.
(phypGetVIOSPartitionID, phypNumDomainsGeneric, phypGetLparID)
(phypGetLparMem, phypGetLparCPUGeneric, phypGetRemoteSlot)
(phypGetVIOSNextSlotNumber, phypAttachDevice)
(phypGetStoragePoolSize, phypStoragePoolNumOfVolumes)
(phypNumOfStoragePools, phypInterfaceDestroy)
(phypInterfaceDefineXML, phypInterfaceLookupByName)
(phypInterfaceIsActive, phypNumOfInterfaces): Use it.
(phypNumDomainsGeneric): Correctly find numeric line.

14 years agomaint: ignore built file
Eric Blake [Mon, 18 Apr 2011 15:30:49 +0000 (09:30 -0600)]
maint: ignore built file

* .gitignore: Add exemption for hashtest.

14 years agobuild: fix qemu build failure in previous patch
Daniel P. Berrange [Mon, 18 Apr 2011 11:41:23 +0000 (12:41 +0100)]
build: fix qemu build failure in previous patch

This last minute addition caused a build failure

cc1: warnings being treated as errors
qemu/qemu_process.c: In function 'qemuProcessHandleWatchdog':
qemu/qemu_process.c:436:34: error: ignoring return value of 'virDomainObjUnref', declared with attribute warn_unused_result [-Wunused-result]
make[3]: *** [libvirt_driver_qemu_la-qemu_process.lo] Error 1

14 years agoChange some variable names to follow standard in daemon dispatcher
Daniel P. Berrange [Wed, 13 Apr 2011 18:10:03 +0000 (19:10 +0100)]
Change some variable names to follow standard in daemon dispatcher

Replace some occurrances of

  virDomainPtr domain;
  virNetworkPtr network;

With

  virDomainPtr dom;
  virNetworkPtr net;

* daemon/remote.c: Fix variable naming to follow standard

14 years agoWrite error check conditionals in more compact form for dispatcher
Daniel P. Berrange [Wed, 13 Apr 2011 17:50:40 +0000 (18:50 +0100)]
Write error check conditionals in more compact form for dispatcher

Replace cases of

     type = virConnectGetType(conn);
     if (type == NULL)
         goto cleanup;

With

     if (!(type = virConnectGetType(conn)))
         goto cleanup;

* daemon/remote.c: Write error checks in compat form

14 years agoRemove curly braces on all single-line conditional jumps in dispatcher
Daniel P. Berrange [Wed, 13 Apr 2011 17:23:00 +0000 (18:23 +0100)]
Remove curly braces on all single-line conditional jumps in dispatcher

Replace all occurrances of

   if (....) {
      goto cleanup;
   }

With

   if (.....)
      goto cleanup;

to save one line of code

* daemon/remote.c: Remove curly braces on single line conditionals

14 years agoFix checking of return codes in dispatcher
Daniel P. Berrange [Wed, 13 Apr 2011 17:13:37 +0000 (18:13 +0100)]
Fix checking of return codes in dispatcher

The libvirt APIs reserve any negative value for indicating an
error. Thus checks

    if (virXXXX() == -1)

Should instead be

    if (virXXXX() < 0)

* daemon/remote.c: s/ == -1/ < 0/

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.