1. 07 5月, 2013 9 次提交
  2. 05 5月, 2013 2 次提交
  3. 04 5月, 2013 2 次提交
  4. 03 5月, 2013 24 次提交
    • D
      Fix docs generator regression in previous commit · 7ee85c99
      Daniel P. Berrange 提交于
      The previous commit failed to update the XSL to take account
      of fact that in XHTML mode the elements need namespace
      prefixes. This caused every web page to be blank!
      7ee85c99
    • D
      Fix multiple formatting problems in HTML docs · f2f9742d
      Daniel P. Berrange 提交于
      The rule generating the HTML docs passing the --html flag
      to xsltproc. This makes it use the legacy HTML parser, which
      either ignores or tries to fix all sorts of broken XML tags.
      There's no reason why we should be writing broken XML in
      the first place, so removing --html and adding the XHTML
      doctype to all files forces us to create good XML.
      
      This adds the XHTML doc type and fixes many, many XML tag
      problems it exposes.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f2f9742d
    • G
      Make detect_scsi_host_caps a function on all architectures · 58662f44
      Guido Günther 提交于
      In the non linux case some callers like gather_scsi_host_caps needed the
      return code of -1 while others like update_caps needed an empty
      statement (to avoid a "statement without effect" warning). This is much
      simpler solved by using a function instead of a define.
      58662f44
    • G
      Fixup rpcgen code on kFreeBSD too · b562d7b7
      Guido Günther 提交于
      since it uses glibc's rpcgen.
      b562d7b7
    • D
      Ignore 'uri' parameter in lockd driver · d80b5b7f
      Daniel P. Berrange 提交于
      A 'uri' parameter was added for the benefit of sanlock. This
      causes a warning in the lockd driver though
      
      2013-05-03 13:20:35.347+0000: 28403: error : virLockManagerLockDaemonNew:482 : internal error Unexpected parameter uri for object
      
      Ignore this parameter, since lockd does not require it and it
      is harmless if not used.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d80b5b7f
    • L
      network: fix network driver startup for qemu:///session · 2ffd87d8
      Laine Stump 提交于
      This should resolve https://bugzilla.redhat.com/show_bug.cgi?id=958907
      
      Recent new addition of code to read/write active network state to the
      NETWORK_STATE_DIR in the network driver broke startup for
      qemu:///session. The network driver had several state file paths
      hardcoded to /var, which could never possibly work in session mode.
      
      This patch modifies *all* state files to use a variable string that is
      set differently according to whether or not we're running
      privileged. (It turns out that logDir was never used, so it's been
      completely eliminated.)
      
      There are very definitely other problems preventing dnsmasq and radvd
      from running in non-privileged mode, but it's more consistent to have
      the directories used by them be determined in the same fashion.
      
      NB: I've noted before that the network driver is storing its state
      (including dnsmasq and radvd state) in /var/lib, while qemu stores its
      state in /var/run. It would probably have been better if the two
      matched, but it's been this way for a long time, and changing it would
      break running installations during an upgrade, so it's best to just
      leave it as it is.
      2ffd87d8
    • D
      Fix warning about unsupported cookie flags in QEMU driver · 848a08bc
      Daniel P. Berrange 提交于
      The QEMU migration code unconditionally sets the 'persistent'
      cookie flag on the source host. The dest host, however, only
      allows it during parsing if VIR_MIGRATE_PERSIST_DEST was
      set. Make the source host only set it if this flag is
      present.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      848a08bc
    • D
      Fix release of resources with lockd plugin · 8dc93ffa
      Daniel P. Berrange 提交于
      The lockd plugin for the lock manager was not correctly
      handling the release of resource locks. This meant that
      during migration, or when pausing a VM, the locks would
      not get released. This in turn made it impossible to
      resume the domain, or finish migration
      8dc93ffa
    • D
      Fix F_DUPFD_CLOEXEC operation args · d6670a64
      Daniel P. Berrange 提交于
      The F_DUPFD_CLOEXEC operation with fcntl() expects a single
      int argument, specifying the minimum FD number for the newly
      dup'd file descriptor. We were not specifying that causing
      random stack data to be accessed as the FD number. Sometimes
      that worked, sometimes it didn't.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d6670a64
    • E
      build: avoid non-portable cast of pthread_t · 22d12905
      Eric Blake 提交于
      POSIX says pthread_t is opaque.  We can't guarantee if it is scaler
      or a pointer, nor what size it is; and BSD differs from Linux.
      We've also had reports of gcc complaining on attempts to cast it,
      if we use a cast to the wrong type (for example, pointers have to be
      cast to void* or intptr_t before being narrowed; while casting a
      function return of scalar pthread_t to void* triggers a different
      warning).
      
      Give up on casts, and use unions to get at decent bits instead.  And
      rather than futz around with figuring which 32 bits of a potentially
      64-bit pointer are most likely to be unique, convert the rest of
      the code base to use 64-bit values when using a debug id.
      
      Based on a report by Guido Günther against kFreeBSD, but with a
      fix that doesn't regress commit 4d970fd2 for FreeBSD.
      
      * src/util/virthreadpthread.c (virThreadSelfID, virThreadID): Use
      union to get at a decent bit representation of thread_t bits.
      * src/util/virthread.h (virThreadSelfID, virThreadID): Alter
      signature.
      * src/util/virthreadwin32.c (virThreadSelfID, virThreadID):
      Likewise.
      * src/qemu/qemu_domain.h (qemuDomainJobObj): Alter type of owner.
      * src/qemu/qemu_domain.c (qemuDomainObjTransferJob)
      (qemuDomainObjSetJobPhase, qemuDomainObjReleaseAsyncJob)
      (qemuDomainObjBeginNestedJob, qemuDomainObjBeginJobInternal): Fix
      clients.
      * src/util/virlog.c (virLogFormatString): Likewise.
      * src/util/vireventpoll.c (virEventPollInterruptLocked):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      22d12905
    • L
      build: fix make rpm failure · 9eafa251
      Laine Stump 提交于
      Commit 297c99a5 accidentally put a { where a ( belonged, causing make
      rpm to fail.
      9eafa251
    • D
      More paranoid initialization of 'nparams' variable in dispatch code · 329b7602
      Daniel P. Berrange 提交于
      Since the 'nparams' variable passed to virTypedParametersFree is
      supposed to represent the size of the 'params' array, it is bad
      practice to initialize it to a non-zero value, until the array
      has been allocated.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      329b7602
    • D
      Fix potential use of undefined variable in remote dispatch code · 31dbbb66
      Daniel P. Berrange 提交于
      If an early dispatch check caused a jump to the 'cleanup' branch
      then virTypeParamsFree() would be called with an uninitialized
      'nparams' variable. Fortunately 'params' is initialized to NULL,
      so the uninitialized 'nparams' variable would not be used.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      31dbbb66
    • D
      Remove redundant () in expression · 377ac10c
      Daniel P. Berrange 提交于
      The use of () in a simple boolean comparison was not
      required
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      377ac10c
    • D
      Fix format string handling in network driver · 5c1678ab
      Daniel P. Berrange 提交于
      The call to virReportError conditionally switched between
      two format strings, with different numbers of placeholders.
      This meant the format string with no placeholders was not
      protected by a "%s".
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5c1678ab
    • J
      docs: fix 'since' for socket path generation · bb5cd564
      Ján Tomko 提交于
      Commit 297c99a5 says it works from 1.0.5 but it only got pushed
      after the 1.0.5 release.
      bb5cd564
    • M
      esx: Reduce code duplication in generator · 4ffb52ac
      Matthias Bolte 提交于
      4ffb52ac
    • J
      build: Fix build when WITH_HAL is defined · ce45c761
      Jim Fehlig 提交于
      Commit 7c9a2d88 missed inclusion of virstring.h in a few places
      when WITH_HAL is defined, causing build failures.
      ce45c761
    • E
      build: fix mingw build of vbox · 4f8e2bac
      Eric Blake 提交于
      More fallout from commit 7c9a2d88 dropping too many headers.  Fixes:
      
      In file included from ../../src/vbox/vbox_glue.c:26:0:
      ../../src/vbox/vbox_MSCOMGlue.c: In function 'vboxLookupVersionInRegistry':
      ../../src/vbox/vbox_MSCOMGlue.c:435:5: error: implicit declaration of function 'virParseVersionString' [-Werror=implicit-function-declaration]
      ...
      ../../src/vbox/vbox_driver.c: In function 'vboxConnectOpen':
      ../../src/vbox/vbox_driver.c:147:5: error: implicit declaration of function 'getuid' [-Werror=implicit-function-declaration]
      ../../src/vbox/vbox_driver.c:147:5: error: nested extern declaration of 'getuid' [-Werror=nested-externs]
      
      * src/vbox/vbox_MSCOMGlue.c (includes): Add missing includes.
      * src/vbox/vbox_driver.c (includes): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4f8e2bac
    • E
      build: fix mingw build of virprocess.c · 05f79a38
      Eric Blake 提交于
      Commit 776d49f4 added a static function that is only called
      conditionally; leading to this compile error on mingw:
      
        CC       libvirt_util_la-virprocess.lo
      ../../src/util/virprocess.c:624:26: error: 'struct rlimit' declared inside parameter list [-Werror]
      ../../src/util/virprocess.c:624:26: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
      ../../src/util/virprocess.c:622:1: error: 'virProcessPrLimit' defined but not used [-Werror=unused-function]
      
      * src/util/virprocess.c (virProcessPrLimit): Only declare
      virProcessPrLimit when used.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      05f79a38
    • E
      build: fix FreeBSD build · 348ac061
      Eric Blake 提交于
      Commit 7c9a2d88 cleaned up too many headers; FreeBSD builds
      failed due to:
      
      util/virutil.c:556: warning: implicit declaration of function 'canonicalize_file_name'
      
      (Not sure which Linux header leaked this declaration, but gnulib
      only guarantees it in stdlib.h)
      
      libvirt.c:956: warning: implicit declaration of function 'virGetUserConfigDirectory'
      
      (Here, a build on Linux was picking up virutil.h indirectly via
      one of the conditional driver headers, where that driver was not
      being built on my FreeBSD setup)
      
      * src/util/virutil.c (includes): Need <stdlib.h> for
      canonicalize_file_name.
      * src/libvirt.c (includes): Use "virutil.h" unconditionally,
      rather than relying on conditional indirect inclusion.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      348ac061
    • E
      build: avoid useless virAsprintf · 25ae3d30
      Eric Blake 提交于
      virAsprintf(&foo, "%s", bar) is wasteful compared to
      foo = strdup(bar) (or eventually, VIR_STRDUP(foo, bar),
      but one thing at a time...).
      
      Noticed while reviewing Laine's attempt to clean up broken
      qemu:///session.
      
      * cfg.mk (sc_prohibit_asprintf): Enhance rule.
      * src/esx/esx_storage_backend_vmfs.c
      (esxStorageBackendVMFSVolumeLookupByKey): Fix offender.
      * src/network/bridge_driver.c (networkStateInitialize): Likewise.
      * src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopDHCPOpen):
      Likewise.
      * src/storage/storage_backend_sheepdog.c
      (virStorageBackendSheepdogRefreshVol): Likewise.
      * src/util/vircgroup.c (virCgroupAddTaskStrController): Likewise.
      * src/util/virdnsmasq.c (addnhostsAdd): Likewise.
      * src/xen/block_stats.c (xenLinuxDomainDeviceID): Likewise.
      * src/xen/xen_driver.c (xenUnifiedConnectOpen): Likewise.
      * tools/virsh.c (vshGetTypedParamValue): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      25ae3d30
    • E
      build: always include sanitytest in tarball · 5a3487da
      Eric Blake 提交于
      The libvirt 1.0.5 tarball is missing a file which renders 'make
      check' broken; first reported on list by Guido Günther.
      
      * python/Makefile.am (EXTRA_DIST): Hoist sanitytest.py out of
      HAVE_PYTHON conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5a3487da
    • L
      util: fix compile errors caused by moving string functions · cc8f9e67
      Laine Stump 提交于
      commit 7c9a2d88 missed adding in a few #include "virstring.h"s, causing
      builds to fail.
      cc8f9e67
  5. 02 5月, 2013 3 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
    • M
      qemu: Generate agent socket path if missing · 297c99a5
      Michal Privoznik 提交于
      It's not desired to force users imagine path for a socket they
      are not even supposed to connect to. On the other hand, we
      already have a release where the qemu agent socket path is
      exposed to XML, so we cannot silently drop it from there.
      The new path is generated in form:
      
      $LOCALSTATEDIR/lib/libvirt/qemu/channel/target/$domain.$name
      
      for qemu system mode, and
      
      $XDG_CONFIG_HOME/qemu/lib/channel/target/$domain.$name
      
      for qemu session mode.
      297c99a5
    • G
      virInitctlRequest: unbreak make syntax check · ca75c443
      Guido Günther 提交于
      introduced by dcf97846
      
      To trigger this cppi needs to be installed.
      ca75c443