1. 21 5月, 2010 6 次提交
    • J
      maint: mark translatable string args of VIR_ERROR0 · 8d63d82e
      Jim Meyering 提交于
      Run this:
        git grep -l 'VIR_ERROR0\s*("'|xargs perl -pi -e \
          's/(VIR_ERROR0)\s*\((".*?")\)/$1(_($2))/'
      8d63d82e
    • J
      maint: use VIR_ERROR0 rather than VIR_ERROR with a bare "%s" · 5910472f
      Jim Meyering 提交于
      Change VIR_ERROR("%s", "..."
      to     VIR_ERROR0("..."
      
      and
      
      Change VIR_ERROR("%s", _("...")
      to     VIR_ERROR0(_("...")
      
      Use this command:
        git grep -E -l 'VIR_ERROR\("%s", (_\()?"'|xargs perl -pi -e \
        's/VIR_ERROR\("%s", (_\()?"/VIR_ERROR0($1"/'
      5910472f
    • C
      qemu driver: fix version check typos · c80651a5
      Chris Wright 提交于
      * src/qemu/qemu_conf.c (qemudParseHelpStr): Fix errors that made
      it impossible to diagnose invalid minor and micro version number
      components.
      Signed-off-by: NChris Wright <chrisw@redhat.com>
      c80651a5
    • C
      qemu: Use ShutdownVMDaemon for all startup cleanup paths · ac23d911
      Cole Robinson 提交于
      The current cleanup: in StartVMDaemon path is a poor duplication.
      qemuShutdownVMDaemon can handle teardown for inactive VMs, so let's use it.
      
      v2: Remove old abort: label, only use cleanup:
      ac23d911
    • J
      qemu_conf.c: also recognize new first line of qemu -help output · 20beb0c0
      Jim Meyering 提交于
      * src/qemu/qemu_conf.c (QEMU_VERSION_STR_1, QEMU_VERSION_STR_2):
      Define these instead of...
      (QEMU_VERSION_STR): ... this.  Remove definition.
      (qemudParseHelpStr): Check first for the new, shorter prefix,
      "QEMU emulator version", and then for the old one,
      "QEMU PC emulator version" when trying to parse the version number.
      Based on a patch by Chris Wright.
      20beb0c0
    • J
      lxc_controller.c: don't ignore failed "accept" · 1f6fc519
      Jim Meyering 提交于
      * src/lxc/lxc_controller.c (ignorable_epoll_accept_errno): New function.
      (lxcControllerMain): Handle a failed accept carefully:
      most errno values indicate legitimate failure and must be fatal.
      However, ignore a special case: that in which an incoming client quits
      between the poll() indicating its presence, and our accept() which
      is trying to process it.
      1f6fc519
  2. 20 5月, 2010 10 次提交
  3. 19 5月, 2010 14 次提交
  4. 18 5月, 2010 10 次提交
    • J
      ebiptablesWriteToTempFile: don't close a negative file descriptor · 0058184c
      Jim Meyering 提交于
      * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesWriteToTempFile):
      Skip the close if "fd" is negative.
      0058184c
    • D
      Protect against NULL pointer flaws in monitor usage · 31e29fe5
      Daniel P. Berrange 提交于
      History has shown that there are frequent bugs in the QEMU driver
      code leading to the monitor being invoked with a NULL pointer.
      Although the QEMU driver code should always report an error in
      this case before invoking the monitor, as a safety net put in a
      generic check in the monitor code entry points.
      
      * src/qemu/qemu_monitor.c: Safety net to check for NULL monitor
        object
      31e29fe5
    • D
      Fix multiple potential NULL pointer references in monitor usage · c4b2a939
      Daniel P. Berrange 提交于
      Any method which intends to invoke a monitor command must have
      a check for virDomainObjIsActive() before using the monitor to
      ensure that priv->mon != NULL.
      
      There is one subtle edge case in this though. If a method invokes
      multiple monitor commands, and calls qemuDomainObjExitMonitor()
      in between two of these commands then there is no guarentee that
      priv->mon != NULL anymore. This is because the QEMU process may
      exit or die at any time, and because qemuDomainObjEnterMonitor()
      releases the lock on virDomainObj, it is possible for the background
      thread to close the monitor handle and thus qemuDomainObjExitMonitor
      will release the last reference allowing priv->mon to become NULL.
      
      This affects several methods, most notably migration but also some
      hotplug methods. This patch takes a variety of approaches to solve
      the problem, depending on the particular usage scenario. Generally
      though it suffices to add an extra virDomainObjIsActive() check
      if qemuDomainObjExitMonitor() was called during the method.
      
      * src/qemu/qemu_driver.c: Fix multiple potential NULL pointer flaws
        in usage of the monitor
      c4b2a939
    • J
      maint: add more free-like functions to the list and deal with fallout · a986892e
      Jim Meyering 提交于
      * cfg.mk (useless_free_options): Add many vir*Free* function names,
      and then remove the useless if-before-free tests exposed by running
      make syntax-check.
      * src/conf/interface_conf.c (virInterfaceDefFree): Remove useless "if".
      (virInterfaceAssignDef): Likewise.
      * src/conf/network_conf.c (virNetworkAssignDef): Likewise.
      * src/conf/storage_conf.c (virStoragePoolObjAssignDef): Likewise.
      * src/node_device/node_device_hal.c (dev_create): Likewise.
      * src/security/virt-aa-helper.c (vahDeinit): Likewise.
      * src/test/test_driver.c (testNodeDeviceCreateXML): Likewise.
      * src/util/conf.c (virConfSetValue): Likewise.
      a986892e
    • J
      qemudDomainSetVcpus: avoid NULL-deref on failed uuid look-up · 20701b17
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainSetVcpus): Upon look-up failure,
      i.e., vm==NULL, goto cleanup, rather than to "endjob", superficially
      since the latter would dereference vm, but more fundamentally because
      we certainly don't want to call qemuDomainObjEndJob before we've
      even attempted qemuDomainObjBeginJob.
      20701b17
    • J
      lxcFreezeContainer: avoid test-after-deref of never-NULL pointer · 93fedcf2
      Jim Meyering 提交于
      * src/lxc/lxc_driver.c (lxcFreezeContainer): Remove test-after-deref.
      Correct indentation in expression.
      93fedcf2
    • M
      Add CIFS to the list of network file systems · 61fb6979
      Matthias Bolte 提交于
      ESX supports NFS and CIFS. The ESX storage driver will reflect this.
      61fb6979
    • E
      qemu_conf: fix flag value · f30ccb24
      Eric Blake 提交于
      (gdb) p/x QEMUD_CMD_FLAG_VNET_HOST
      $7 = 0xffffffff80000000
      
      Oops - that meant we were incorrectly setting QEMU_CMD_FLAG_RTC_TD_HACK
      for qemu-kvm-0.12.3 (and probably botching a few other settings as well).
      
      Fixes Red Hat BZ#592070
      
      * src/qemu/qemu_conf.h (QEMUD_CMD_FLAG_VNET_HOST): Avoid sign
      extension.
      * tests/qemuhelpdata/qemu-kvm-0.12.3: New file.
      * tests/qemuhelptest.c (mymain): Add another case.
      f30ccb24
    • C
      qemu: Clarify a couple error messages · 07c621d0
      Cole Robinson 提交于
      A fedora translator filed:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=580816
      
      Pointing out these two error messages as unclear: "write save" sounds
      like a typo without context, and lack of a colon made the second message
      difficult to parse.
      07c621d0
    • E
      virFileResolveLink: fix return value · d533a98e
      Eric Blake 提交于
      virFileResolveLink was returning a positive value on error,
      thus confusing callers that assumed failure was < 0.  The
      confusion is further evidenced by callers that would have
      ended up calling virReportSystemError with a negative value
      instead of a valid errno.
      
      Fixes Red Hat BZ #591363.
      
      * src/util/util.c (virFileResolveLink): Live up to documentation.
      * src/qemu/qemu_security_dac.c
      (qemuSecurityDACRestoreSecurityFileLabel): Adjust callers.
      * src/security/security_selinux.c
      (SELinuxRestoreSecurityFileLabel): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskDeleteVol): Likewise.
      d533a98e