1. 11 1月, 2017 10 次提交
    • D
      vbox: consolidate vbox IID structures. · 73c6f16b
      Dawid Zamirski 提交于
      * remove _vboxIID_v2_x and _vboxIID_v3_x structs and repalce with one
        _vboxIID as all supprted vbox versions have the same IID structure.
      * remove vboxIIDUnion that was used to abstract version depended IID
        differences.
      * remove IID_MEMBER macro and use the new vboxIID directly.
      73c6f16b
    • D
      vbox: fix _displayTakeScreenShotPNGToArray · 36288917
      Dawid Zamirski 提交于
      This function was not implemented for vbox 5+ which removed
      TakeScreenShotPNGToArray but provides TakeScreenShotToArray with
      BitmapFormat_PNG argument which is the same thing.
      36288917
    • D
      vbox: IVRDxServer to IVRDEServer. · 5a5c6de3
      Dawid Zamirski 提交于
      The IVRDxServer was used because vbox < 4 used to have IVRDPServer
      whereas vbox >= 4 has IVRDEServer. Now that support for legacy
      versions is being removed, we can use IVRDEServer.
      5a5c6de3
    • D
      vbox: remove code dealing with oldMediumInterface · f2f70c21
      Dawid Zamirski 提交于
      * removed oldMediumInterface flag and related code that was used for
        vbox 2.x
      * remove accelerate2DVideo and networkRemoveInterface flags which were
        also conditionals for handling legacy vbox versions.
      f2f70c21
    • D
      vbox: remove domain events support. · 1d963578
      Dawid Zamirski 提交于
      this was implemented only for vbox 3 series and was mostly stubs
      anyway.
      1d963578
    • D
      vbox: remove getMachineForSession flag. · 374422ea
      Dawid Zamirski 提交于
      * the getMachineForSession is always true for 4.0+. This also means that
        checkflag argument in openSessionForMachine no longer has any meaning
        because it was or'ed with getMachineForSession (always true)
      * remove supportScreenshot flag - vbox 4.0+ supports it
      * remove detachDevicesExplicitly flag only relevant for < 4.0
      374422ea
    • D
      vbox: do not use IHardDisk anymore. · d7f369b5
      Dawid Zamirski 提交于
      VirtualBox 4.0+ uses IMedium and IHardDisk is no longer used, so
      
      * remove typef IMedium IHardDisk
      * merge UIHardDisk into UIMedium
      * update all references accordingly
      d7f369b5
    • D
      vbox: remove _vboxAttachDrivesOld · c7c286c6
      Dawid Zamirski 提交于
      and fold vboxAttachDrivesNew into vboxAttachDrives
      c7c286c6
    • D
      vbox: remove code for old API versions. · c8d7e90f
      Dawid Zamirski 提交于
      This removes most of the code wrapped in VBOX_API_VERSION < 4000000
      preprocessor checks. Those are the ones that can be safely removed
      without needing to update driver code to accomodate it.
      c8d7e90f
    • D
      vbox: remove SDK header files for vbox 3 and older. · 7f10ac33
      Dawid Zamirski 提交于
      * delete SDK header files for vbox older than 4.0
      * delete .c files for vbox older than 4.0
      * update vbox_XPCOMCGlue to use oldest supported header file, that is 4.0
        going forward.
      * remove deleted files from Makefile.am
      7f10ac33
  2. 02 12月, 2016 1 次提交
  3. 24 11月, 2016 2 次提交
    • D
      vbox: get rid of g_pVBoxGlobalData · 63586535
      Dawid Zamirski 提交于
      now that we have a new global vboxDriver object, remove the old
      vboxGlobalData struct and all references to it.
      63586535
    • D
      vbox: change how vbox API is initialized. · 04518c36
      Dawid Zamirski 提交于
      * add vboxDriver object to serve as a singleton global object that
        holds references to IVirtualBox and ISession to be shared among
        multiple connections. The vbox_driver is instantiated only once in
        the first call vboxGetDriverConnection function that is guarded by
        a mutex.
      
      * call vbox API initialize only when the first connection is
        established, and likewise uninitialize when last connection
        disconnects. The prevents each subsequent connection from overwriting
        IVirtualBox/ISession instances of any other active connection that
        led to libvirtd segfaults. The virConnectOpen and virConnectClose
        implementations are guarded by mutex on the global vbox_driver_lock
        where the global vbox_driver object counts connectios and decides
        when it's safe to call vbox's init/uninit routines.
      
      * add IVirutalBoxClient to vboxDriver and use it to in tandem with newer
        pfnClientInitialize/pfnClientUninitalize APIs for vbox versions that
        support it, to avoid usage of the old pfnComInitialize/Uninitialize.
      04518c36
  4. 08 11月, 2016 1 次提交
  5. 24 6月, 2016 1 次提交
  6. 08 3月, 2016 1 次提交
    • M
      _virtualboxCreateMachine: Avoid unbounded stack · 18f231e6
      Michal Privoznik 提交于
      If the stars are in the right position and you're building with
      VBox >= 4.2.0 it will happen that compiler thinks an array
      allocated on the stack may be unbounded:
      
      In file included from vbox/vbox_V4_2.c:13:0:
      vbox/vbox_tmpl.c: In function '_virtualboxCreateMachine':
      vbox/vbox_tmpl.c:2811:1: error: stack usage might be unbounded [-Werror=stack-usage=]
       _virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **machine, char *uuidstr ATTRIBUTE_UNUSED)
       ^
      
      Well, given how the variable is declared, I had some hard time
      seeing it is actually bounded. Surprisingly compiler does not
      complain because of -Wframe-larger-than. This is because
      variable length arrays do not count into that warning.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      18f231e6
  7. 03 3月, 2016 1 次提交
    • M
      Initialize couple of variables. · bde6e002
      Michal Privoznik 提交于
      While trying to build with -Os couple of compile errors showed
      up.
      
      conf/domain_conf.c: In function 'virDomainChrRemove':
      conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virDomainChrDefPtr ret, **arrPtr = NULL;
                              ^
      Compiler fails to see that @ret is used only if set in the loop,
      but whatever, there's no harm in initializing the variable.
      
      In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks
      that @rc may be used uninitialized. Well, not directly, but maybe
      after some optimization. Yet again, no harm in initializing a
      variable.
      
      In file included from ./util/virthread.h:26:0,
                       from ./datatypes.h:28,
                       from vbox/vbox_tmpl.c:43,
                       from vbox/vbox_V3_1.c:37:
      vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld':
      ./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,              \
           ^
      In file included from vbox/vbox_V3_1.c:37:0:
      vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here
           nsresult rc;
                    ^
      Yet again, one uninitialized variable:
      
      qemu/qemu_driver.c: In function 'qemuDomainBlockCommit':
      qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               qemuDomainPrepareDiskChainElement(driver, vm, baseSource,
               ^
      
      And another one:
      
      storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
      storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                             thisSource->devices[j].path))
                                       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bde6e002
  8. 11 2月, 2016 4 次提交
  9. 15 5月, 2015 1 次提交
  10. 08 4月, 2015 1 次提交
  11. 19 11月, 2014 1 次提交
  12. 15 11月, 2014 1 次提交
  13. 29 10月, 2014 15 次提交