1. 15 6月, 2011 35 次提交
  2. 14 6月, 2011 5 次提交
    • E
      storage: avoid an intermediate malloc · 66dc2ae6
      Eric Blake 提交于
      Suggested here:
      https://www.redhat.com/archives/libvir-list/2011-May/msg00594.html
      
      * src/storage/storage_backend.c (virStorageBackendCreateQemuImg):
      Generate size inline.
      66dc2ae6
    • E
      command: avoid double close · f3d67544
      Eric Blake 提交于
      Previously, the parent process opened 'null' to /dev/null, then
      the child process closes 'null' as well as 'childout'.  But if
      childout was set to be null, then this is a double close.  At
      least the double close was confined to the child process after a
      fork, and therefore there is no risk of another thread opening
      an fd of the same value to be bitten by the double close, but it
      is always better to avoid double-close to begin with.
      
      Additionally, if all three fds were specified, then opening
      'null' was wasted.
      
      This patch fixes things to lazily open null on the first use,
      then guarantees it gets closed exactly once.
      
      * src/util/command.c (getDevNull): New helper function.
      (virExecWithHook): Use it to avoid spurious opens and double close.
      f3d67544
    • E
      command: reduce duplicated debug messages · c668c897
      Eric Blake 提交于
      This also reduces malloc pressure for invoking a child when
      VIR_DEBUG is enabled.
      
      * src/util/command.c (virExecWithHook): Drop debug, since the only
      caller (virCommandRunAsync) also prints debug info.
      c668c897
    • E
      docs: improve VIR_DOMAIN_AFFECT_CURRENT description · ccf7c4b9
      Eric Blake 提交于
      * include/libvirt/libvirt.h.in (virDomainModificationImpact): Reword.
      ccf7c4b9
    • C
      qemu: Fix parsing 'info chardev' · c0980a3a
      Cole Robinson 提交于
      If qemu supports -chardev, our char frontend aliases are ex. 'charserial0'
      not just 'serial0'. Typically we don't use this code path because the
      pty's are scraped from stdout.
      c0980a3a