1. 16 6月, 2011 3 次提交
    • E
      sendkey: use consistent API convention · 1d575629
      Eric Blake 提交于
      Even though rpc uses 'unsigned int' for the _len parameter that
      passes the length of item<length>, the public libvirt APIs all
      use 'int' and filter out lengths < 0, except for virDomainSendKey.
      
      * include/libvirt/libvirt.h.in (virDomainSendKey): All other APIs
      use int for array length.
      * src/libvirt.c (virDomainSendKey): Adjust.
      * src/driver.h (virDrvDomainSendKey): Likewise.
      * daemon/remote_generator.pl: Likewise.
      1d575629
    • E
      build: export correct function names · b33cd5e3
      Eric Blake 提交于
      Detected by autobuild.sh, when targetting mingw.
      Introduced in commit 98bfdff1.
      
      * src/libvirt_private.syms: Fix typos.
      b33cd5e3
    • E
      build: avoid compiler warning on non-Linux · a1df7054
      Eric Blake 提交于
      Detected by autobuild.sh when cross-building for mingw.
      Introduced in commits ce76e853 and af35cece.
      
      * src/nodeinfo.c (nodeGetCPUStats, nodeGetMemoryStats): Mark
      parameters as potentially unused.
      a1df7054
  2. 15 6月, 2011 26 次提交
  3. 14 6月, 2011 11 次提交
    • 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
    • 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
    • C
      qemu: Scrape stdout for virtio console pty · d0b1a9a0
      Cole Robinson 提交于
      Currently we forget to do this and have to fallback to info chardev (which
      also fails, see following patch)
      d0b1a9a0
    • G
    • O
      util: Cleanup indention problem in virterror.c · e22a6e9d
      Osier Yang 提交于
      Push under trivial rule.
      e22a6e9d
    • O
      qemu: Parse current balloon value returned by query_balloon · 41514f7b
      Osier Yang 提交于
      Qemu once supported following memory stats which will returned by
      "query_balloon":
      
          stat_put(dict, "actual", actual);
          stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
          stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
          stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
          stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
          stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
          stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
      
      But it later disabled all the stats except "actual" by commit
      07b0403dfc2b2ac179ae5b48105096cc2d03375a.
      
      libvirt doesn't parse "actual", so user will always see a empty result
      with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
      we should support parsing "actual".
      41514f7b
    • T
      vcpupin: Fix cpu affinity setting bug of qemu driver · d5f3320d
      Taku Izumi 提交于
      There is the case where cpu affinites for vcpu of qemu doesn't work
      correctly. For example, if only one vcpupin setting entry is provided
      and its setting is not for vcpu0, it doesn't work.
      
         # virsh dumpxml VM
         ...
         <vcpu>4</vcpu>
         <cputune>
           <vcpupin vcpu='3' cpuset='9-11'/>
         </cputune>
         ...
      
         # virsh start VM
         Domain VM started
      
         # virsh vcpuinfo VM
         VCPU:           0
         CPU:            31
         State:          running
         CPU time:       2.5s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           1
         CPU:            12
         State:          running
         CPU time:       0.9s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           2
         CPU:            30
         State:          running
         CPU time:       1.5s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           3
         CPU:            13
         State:          running
         CPU time:       1.7s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
      This patch fixes this problem.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      d5f3320d
    • M
      Fix dlopen dependency · bfbeafbd
      Matthias Bolte 提交于
      Since the addition of the lock manager framework in 6a943419
      dlopen is always required, but the checks in configure wasn't changed
      to reflect that. This didn't show up directly because the VirtualBox
      driver linking dlopen in covered it. But disabling the VirtualBox
      driver makes the build fail due to missing dlopen.
      
      Change the dlopen check in configure to pick up dlopen when available.
      
      Reported by Ruben Kerkhof.
      bfbeafbd
    • H
      Deprecate several CURRENT/LIVE/CONFIG enums · fbd7820b
      Hu Tao 提交于
      This patch deprecates following enums:
      
      VIR_DOMAIN_MEM_CURRENT
      VIR_DOMAIN_MEM_LIVE
      VIR_DOMAIN_MEM_CONFIG
      
      VIR_DOMAIN_VCPU_LIVE
      VIR_DOMAIN_VCPU_CONFIG
      
      VIR_DOMAIN_DEVICE_MODIFY_CURRENT
      VIR_DOMAIN_DEVICE_MODIFY_LIVE
      VIR_DOMAIN_DEVICE_MODIFY_CONFIG
      
      And modify internal codes to use virDomainModificationImpact.
      fbd7820b