1. 15 5月, 2015 1 次提交
  2. 08 4月, 2015 1 次提交
  3. 19 11月, 2014 1 次提交
  4. 15 11月, 2014 1 次提交
  5. 29 10月, 2014 18 次提交
    • E
      maint: avoid static zero init in drivers · ec81cf89
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/libxl/libxl_driver.c: Fix initialization.
      * src/lxc/lxc_controller.c: Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/phyp/phyp_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/vbox/vbox_XPCOMCGlue.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ec81cf89
    • T
      vbox: Remove unused things in vbox_tmpl.c · 2f055b00
      Taowei Luo 提交于
      After rewriting the whole driver, Only version specified code is
      remained in vbox_tmpl.c. So, this patch removes those unused macros
      header files in vbox_tmpl.c.
      2f055b00
    • T
      vbox: New storage driver · 5892944f
      Taowei Luo 提交于
      This patch provides the new stroage driver for vbox. The work
      is similar with patch 87dea4fc and the next b4022de3.
      5892944f
    • T
      vbox: Rewrite vboxStorageVolGetPath · 013aa081
      Taowei Luo 提交于
      013aa081
    • T
      vbox: Rewrite vboxStorageVolGetXMLDesc · 4df7b206
      Taowei Luo 提交于
      4df7b206
    • T
      vbox: Rewrite vboxStorageVolGetInfo · 80f35e6e
      Taowei Luo 提交于
      80f35e6e
    • T
      vbox: Rewrite vboxStorageVolDelete · 1c2c3906
      Taowei Luo 提交于
      The API on IHardDiskAttachment is merged into IMediumAttachment.
      So, we don't need it anymore.
      1c2c3906
    • T
      vbox: Make IMediumAttachment work with vbox2.2 and 3.0 · 3d33e388
      Taowei Luo 提交于
      The GetMedium will always return a IHardDisk object them.
      In 2.2 and 3.0, it is what GetHardDisk exactly do. In 3.1 and later,
      The IMedium is same as IHardDisk.
      3d33e388
    • T
      vbox: Rewrite vboxStorageVolCreateXML · 0cd409cd
      Taowei Luo 提交于
      If the <path> in target element is not given, libvirt will put the
      new volume in ~/.VirtualBox by default.
      0cd409cd
    • T
      vbox: Make CreateHardDisk support all vbox versions · 382e655d
      Taowei Luo 提交于
      The CreateHardDiskMedium only support create HardDisk for medium
      type, and it only works when vbox version >= 3.1. This patch make
      the function workable with all vbox versions and rename it as
      CreateHardDisk.
      
      In vbox 2.2 and 3.0 this function will create a IHardDisk object.
      In vbox later than 3.0, this function will create a IMedium object.
      382e655d
    • T
      vbox: Rewrite vboxStorageVolLookupByPath · fc41e003
      Taowei Luo 提交于
      fc41e003
    • T
      vbox: Make FindMedium support old vbox versions · 1599319c
      Taowei Luo 提交于
      In old version, function FindMedium in UIVirtualBox doesn't work
      for vbox2.2 and 3.0. We assume it will not be used when vbox in
      these versions.
      
      But when rewriting vboxStorageVolLookupByPath, we found it was
      compatibe to use FindMedium to get a IHardDisk object, even in
      vbox old versions. To achieve this, first make FindMedium call
      FindHardDisk when VBOX_API_VERSION < 4000000.
      Then change the argument type **IMedium to **IHardDisk. (As the
      rules in heriachy, we can't transfer a IHardDisk to match
      IMedium in output)
      
      In vbox 2.2 and 3.0, the caller must be aware that they will get
      a IHardDisk object in return.
      1599319c
    • T
      vbox: Rewrite vboxStorageVolLookupByKey · f67ae174
      Taowei Luo 提交于
      f67ae174
    • T
      vbox: Rewrite vboxStorageVolLookupByName · 8a8fa504
      Taowei Luo 提交于
      8a8fa504
    • T
      vbox: Rewrite vboxStoragePoolListVolumes · c3c8cd4f
      Taowei Luo 提交于
      c3c8cd4f
    • T
      vbox: Rewrite vboxStoragePoolNumOfVolumes · ce381d37
      Taowei Luo 提交于
      We use typedef IMedium IHardDisk to make IHardDisk hierachy from
      IMedium (Actually it did on vbox 2.2 and 3.0's C++ API).
      So when calling
          VBOX_MEDIUM_FUNC_ARG*(IHardDisk, func, args)
      we can directly replace it to
          gVBoxAPI.UIMedium.func(IHardDisk, args)
      
      When dealing with this two types, we get some rules from it's
      hierachy relationship.
      
      When using IHardDisk and IMedium as input, we can't transfer a
      IMedium to IHardDisk. Like:
          gVBoxAPI.UIHardDisk.func(IHardDisk *hardDisk, args)
          Here, we can't put a *IMedium as a argument.
      
      When using IHardDisk and IMedium as output, we can't transfer a
      IHardDisk to IMedium. Like:
          gVBoxAPI.UIMachine.GetMedium(IMedium **out)
          Here, we can't put a **IHardDisk as a argument. If this case
          do happen, we either change the API to GetHardDisk or write a
          new one.
      ce381d37
    • T
      vbox: Rewrite vbox-independent functions · 459886d4
      Taowei Luo 提交于
      This patch rewrites the following functions
          *vboxStorageOpen
          *vboxStorageClose
          *vboxConnectNumOfStoragePools
          *vboxConnectListStoragePools
          *vboxStoragePoolLookupByName
      
      These functions do not call any vbox API, so I directly move it
      from vbox_tmpl.c to vbox_storage.c
      
      A small improvement is made on vboxConnectListStoragePools.
      The if condition nnames == 1 is modified to nnames > 0. So if the
      caller put more than one slot to get active storage pools, the new
      function will return exactly one, while the old one would only
      return 0.
      459886d4
    • T
      vbox: Remove VBOX_OBJECT_CHECK macro · a6b1cde3
      Taowei Luo 提交于
      We should follow the rules that CHECK macro only do checking works.
      But this VBOX_OBJECT_CHECK and VBOX_OBJECT_HOST_CHECK declared some
      varibles at the same time, which broke the rule. So the patch
      removed this macros and dispatched it in source code.
      
      The storage driver is still not rewriten at this point. So, I
      remains the VBOX_OBJECT_CHECK macro in vbox_tmpl.c. But this will
      finally be removed in patch 'vbox: Remove unused things in vbox_tmpl.c'
      a6b1cde3
  6. 23 10月, 2014 1 次提交
  7. 03 10月, 2014 13 次提交
  8. 04 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in lxc, vbox, phyp · 279b1b10
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on drivers that had several issues.
      
      * src/lxc/lxc_fuse.c (lxcProcGetattr, lxcProcReadMeminfo): Correct
      use of {}.
      * src/lxc/lxc_driver.c (lxcDomainMergeBlkioDevice): Likewise.
      * src/phyp/phyp_driver.c (phypConnectNumOfDomainsGeneric)
      (phypUUIDTable_Init, openSSHSession, phypStoragePoolListVolumes)
      (phypConnectListStoragePools, phypDomainSetVcpusFlags)
      (phypStorageVolGetXMLDesc, phypStoragePoolGetXMLDesc)
      (phypConnectListDefinedDomains): Likewise.
      * src/vbox/vbox_common.c (vboxAttachSound, vboxDumpDisplay)
      (vboxDomainRevertToSnapshot, vboxDomainSnapshotDelete): Likewise.
      * src/vbox/vbox_tmpl.c (vboxStorageVolGetXMLDesc): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      279b1b10
  9. 15 8月, 2014 3 次提交
    • T
      vbox: Introducing vboxCommonDriver · cdba7c90
      Taowei 提交于
      After this patch, we will have only one common domain driver.
      So, the rewritten on domain driver is finished in this patch.
      cdba7c90
    • T
      vbox: Add registerDomainEvent · 37cf7594
      Taowei 提交于
      37cf7594
    • T
      vbox: Rewrite vboxNode functions · 1eda86b0
      Taowei 提交于
      Four functions are rewrite in this patch, that is:
      vboxNodeGetInfo
      vboxNodeGetCellsFreeMemory
      vboxNodeGetFreeMemory
      vboxNodeGetFreePages
      Since these functions has nothing to do with vbox,
      it can be directly moved to vbox_common.c. So, I
      merged these things into one patch.
      1eda86b0