1. 26 6月, 2013 3 次提交
    • L
      pci: rename virPCIDeviceGetVFIOGroupDev to virPCIDeviceGetIOMMUGroupDev · 1d829e13
      Laine Stump 提交于
      I realized after the fact that it's probably better in the long run to
      give this function a name that matches the name of the link used in
      sysfs to hold the group (iommu_group).
      
      I'm changing it now because I'm about to add several more functions
      that deal with iommu groups.
      1d829e13
    • L
      pci: eliminate unused driver arg from virPCIDeviceDetach · ee1d1f3b
      Laine Stump 提交于
      The driver arg to virPCIDeviceDetach is no longer used (the name of the stub driver is now set in the virPCIDevice object, and virPCIDeviceDetach retrieves it from there). Remove it.
      ee1d1f3b
    • L
      util: fix bug found by Coverity · 003118de
      Laine Stump 提交于
      Commit 861d4056 added code (my personal change to "clean up" the
      submitter's code, *not* the fault of the submitter) that dereferenced
      virtVlan without first checking for NULL. This patch fixes that and,
      as part of the fix, cleans up some unnecessary obtuseness.
      003118de
  2. 25 6月, 2013 13 次提交
    • R
      Fix units in virNetDevBridgeSetSTPDelay on BSD · f3d08aa0
      Roman Bogorodskiy 提交于
      virNetDevBridgeSetSTPDelay accepts delay in milliseconds,
      but BSD implementation was expecting seconds. Therefore,
      it was working correctly only with delay == 0.
      f3d08aa0
    • J
      Configure native vlan modes on Open vSwitch ports · 861d4056
      james robson 提交于
      This patch adds functionality to allow libvirt to configure the
      'native-tagged' and 'native-untagged' modes on openvswitch networks.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      861d4056
    • J
      Introduce virTypedParamsCopy internal API · d0d5acb5
      Jiri Denemark 提交于
      d0d5acb5
    • J
      Introduce VIR_TYPED_PARAMS_DEBUG macro for dumping typed params · fefb0d54
      Jiri Denemark 提交于
      All APIs that take typed parameters are only using params address in
      their entry point debug messages. With the new VIR_TYPED_PARAMS_DEBUG
      macro, all functions can easily log all individual typed parameters
      passed to them.
      fefb0d54
    • J
      Introduce virTypedParamsReplaceString internal API · 8a7f1166
      Jiri Denemark 提交于
      8a7f1166
    • J
      Introduce virTypedParamsCheck internal API · 637a7c86
      Jiri Denemark 提交于
      This API is useful for checking whether only a specific subset of
      supported typed parameters were passed.
      637a7c86
    • J
      util: Emit proper error code in virTypedParamsValidate · 40369ea6
      Jiri Denemark 提交于
      When unsupported parameter is passed to virTypedParamsValidate,
      VIR_ERR_ARGUMENT_UNSUPPORTED should be returned rather than
      VIR_ERR_INVALID_ARG, which is more appropriate for supported parameters
      used incorrectly.
      40369ea6
    • J
      c40ed416
    • L
      pci: make virPCIDeviceDetach consistent in behavior · 9b4a6666
      Laine Stump 提交于
      virPCIDeviceDetach would previously sometimes consume the input device
      object (to put it on the inactive list) and sometimes not. Avoiding
      memory leaks required checking beforehand to see if the device was
      already on the list, and freeing the device object in the caller only
      if there wasn't already an identical object on the inactive list.
      
      This patch makes it consistent - virPCIDeviceDetach will *never*
      consume the input virPCIDevice object; if it needs to put one on the
      inactive list, it will create a copy and put *that* on the list. This
      way the caller knows that it is always their responsibility to free
      the device object they created.
      9b4a6666
    • L
      pci: eliminate memory leak in virPCIDeviceReattach · f962e8b6
      Laine Stump 提交于
      virPCIDeviceReattach was making the assumption that the dev object
      given to it was one and the same with the dev object on the
      inactiveDevs list. If that had been the case, it would not need to
      free the dev object it removed from the inactive list, because the
      caller of virPCIDeviceReattach always frees the dev object that it
      passes in. Since the dev object passed in is *never* the same object
      that's on the list (it is a different object with the same name and
      attributes, created just for the purpose of searching for the actual
      object), simply doing a "ListSteal" to remove the object from the list
      results in one leaked object; we need to actually free the object
      after removing it from the list.
      f962e8b6
    • L
      pci: new utility functions · 50a8d850
      Laine Stump 提交于
      * virPCIDeviceFindByIDs - find a device on a list w/o creating an object
          This makes searching for an existing device on a list lighter weight.
      
      * virPCIDeviceCopy - make a copy of an existing virPCIDevice object.
      
      * virPCIDeviceGetDriverPathAndName - construct new strings containing
          1) the name of the driver bound to this device.
          2) the full path to the sysfs config for that driver.
          (This code was lifted from virPCIDeviceUnbindFromStub, and replaced
          there with a call to this new function).
      50a8d850
    • L
      pci: change stubDriver from const char* to char* · 53e52b4a
      Laine Stump 提交于
      Previously stubDriver was always set from a string literal, so it was
      okay to use a const char * that wasn't freed when the virPCIDevice was
      freed. This will not be the case in the near future, so it is now a
      char* that is allocated in virPCIDeviceSetStubDriver() and freed
      during virPCIDeviceFree().
      53e52b4a
    • L
      syntax: virPCIDeviceFree is also a NOP for NULL args · d80d0d5d
      Laine Stump 提交于
      add it to the syntax-check list and fix the one offending caller.
      d80d0d5d
  3. 24 6月, 2013 3 次提交
  4. 22 6月, 2013 1 次提交
  5. 21 6月, 2013 3 次提交
  6. 19 6月, 2013 1 次提交
    • J
      util: switch virBufferTrim to void · d0d0413e
      Ján Tomko 提交于
      We don't care whether the trim was succesful or not anywhere
      except the tests.
      
      Switch it to void and set the buffer error on wrong usage.
      d0d0413e
  7. 17 6月, 2013 1 次提交
  8. 14 6月, 2013 4 次提交
  9. 10 6月, 2013 2 次提交
  10. 08 6月, 2013 1 次提交
    • R
      Fix ordering of file open in virProcessGetNamespaces · 68eea850
      Richard Weinberger 提交于
      virProcessGetNamespaces() opens files in /proc/XXX/ns/ which will
      later be passed to setns(). We have to make sure that the file
      descriptors in the array are in the correct order. In particular
      the 'user' namespace must be first otherwise setns() may fail
      for other namespaces.
      
      The order has been taken from util-linux's sys-utils/nsenter.c
      
      Also we must ignore EINVAL in setns() which occurs if the
      namespace associated with the fd, matches the calling process'
      current namespace.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      68eea850
  11. 07 6月, 2013 1 次提交
  12. 06 6月, 2013 3 次提交
  13. 05 6月, 2013 2 次提交
    • E
      maint: don't use config.h in .h files · 1add9c78
      Eric Blake 提交于
      Enforce the rule that .h files don't need to (redundantly)
      include <config.h>.
      
      * cfg.mk (sc_prohibit_config_h_in_headers): New rule.
      (_virsh_includes): Delete; instead, inline a smaller number of
      exclusions...
      (exclude_file_name_regexp--sc_require_config_h)
      (exclude_file_name_regexp--sc_require_config_h_first): ...here.
      * daemon/libvirtd.h (includes): Fix offenders.
      * src/driver.h (includes): Likewise.
      * src/gnutls_1_0_compat.h (includes): Likewise.
      * src/libxl/libxl_conf.h (includes): Likewise.
      * src/libxl/libxl_driver.h (includes): Likewise.
      * src/lxc/lxc_conf.h (includes): Likewise.
      * src/lxc/lxc_driver.h (includes): Likewise.
      * src/lxc/lxc_fuse.h (includes): Likewise.
      * src/network/bridge_driver.h (includes): Likewise.
      * src/phyp/phyp_driver.h (includes): Likewise.
      * src/qemu/qemu_conf.h (includes): Likewise.
      * src/util/virnetlink.h (includes): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1add9c78
    • O
      storage: Support preallocate the new capacity for vol-resize · aa2a4cff
      Osier Yang 提交于
      The document for "vol-resize" says the new capacity will be sparse
      unless "--allocate" is specified, however, the "--allocate" flag
      is never implemented. This implements the "--allocate" flag for
      fs backend's raw type volume, based on posix_fallocate and the
      syscall SYS_fallocate.
      aa2a4cff
  14. 03 6月, 2013 1 次提交
  15. 01 6月, 2013 1 次提交