1. 27 1月, 2015 1 次提交
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
  2. 14 1月, 2015 1 次提交
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
  3. 03 12月, 2014 1 次提交
    • J
      Replace virDomainFree with virObjectUnref · 8fb3aee2
      John Ferlan 提交于
      Since virDomainFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      8fb3aee2
  4. 15 11月, 2014 1 次提交
  5. 07 11月, 2014 1 次提交
  6. 24 10月, 2014 1 次提交
    • E
      hyperv: avoid query memleaks on failure · 0be3403d
      Eric Blake 提交于
      The function hypervEnumAndPull consumes query on success, but leaked
      it on failure.  Rather than having to change all callers (many of
      them indirect callers through the generated
      hypervGetMsvmComputerSystemList), it was easier to just guarantee
      that the buffer is cleaned on return from the function.
      
      * src/hyperv/hyperv_wmi.c (hypervEnumAndPull): Don't leak query on
      failure.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0be3403d
  7. 23 10月, 2014 1 次提交
  8. 03 7月, 2014 1 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
  9. 25 3月, 2014 1 次提交
  10. 18 3月, 2014 2 次提交
  11. 10 3月, 2014 1 次提交
  12. 04 12月, 2013 1 次提交
    • M
      src: Align make output · 2e1ced57
      Michal Privoznik 提交于
      The make inserts six spaces instead of four:
      
        GEN      access/viraccessapichecklxc.h
        GEN    hyperv/hyperv_wmi.generated.h
        GEN      access/viraccessapichecklxc.c
        GEN    hyperv/hyperv_wmi.generated.c
        GEN    hyperv/hyperv_wmi_classes.generated.typedef
        GEN    hyperv/hyperv_wmi_classes.generated.h
        GEN    hyperv/hyperv_wmi_classes.generated.c
        GEN      libvirt_access_qemu.xml
        GEN      libvirt_access.syms
        GEN      libvirt_access_lxc.xml
        GEN      libvirt_access_qemu.syms
        GEN      libvirt_access_lxc.syms
        GEN      libvirt_qemu.def
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi.generated.h
        GEN    esx/esx_vi.generated.c
        GEN      libvirt_lxc.def
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2e1ced57
  13. 11 7月, 2013 1 次提交
  14. 10 7月, 2013 1 次提交
  15. 09 5月, 2013 1 次提交
  16. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  17. 24 4月, 2013 4 次提交
  18. 02 2月, 2013 1 次提交
  19. 21 12月, 2012 6 次提交
  20. 02 11月, 2012 1 次提交
  21. 30 9月, 2012 1 次提交
    • M
      hyperv: Fix and improve hypervListAllDomains · 9e9ea3ea
      Matthias Bolte 提交于
      Use MATCH for all flags checks.
      
      hypervMsvmComputerSystemToDomain expects the domain pointer to the
      initialized to NULL.
      
      All items in doms up to the count-th one are valid, no need to double
      check before freeing them.
      9e9ea3ea
  22. 21 9月, 2012 1 次提交
  23. 06 9月, 2012 1 次提交
    • P
      hyperv: Add implementation for virConnectListAllDomains() · 60d0ecda
      Peter Krempa 提交于
      Hyperv doesn't use the common virDomainObj implementation so this patch
      adds a separate implementation.
      
      This driver supports all currently added flags for filtering although
      some of those don't make sense with this driver (no support yet) and
      thus produce no output when used.
      60d0ecda
  24. 27 7月, 2012 1 次提交
    • E
      maint: avoid regression on copyright listings · 3ad13c92
      Eric Blake 提交于
      Commit f9ce7dad tried to kill uses of a raw street address, but
      missed a few instances.  Automate things so we don't introduce
      new problems in the future.
      
      * cfg.mk (sc_copyright_address): New rule.
      (exclude_file_name_regexp--sc_copyright_address): Add exemption.
      * bootstrap.conf: Adjust offenders.
      * build-aux/augeas-gentest.pl: Likewise.
      * examples/systemtap/events.stp: Likewise.
      * examples/systemtap/qemu-monitor.stp: Likewise.
      * examples/systemtap/rpc-monitor.stp: Likewise.
      * src/dtrace2systemtap.pl: Likewise.
      * src/esx/esx_vi_generator.py: Likewise.
      * src/hyperv/hyperv_wmi_generator.py: Likewise.
      * src/remote/qemu_protocol.x: Likewise.
      * src/remote/remote_protocol.x: Likewise.
      * src/rpc/gensystemtap.pl: Likewise.
      * src/rpc/virnetprotocol.x: Likewise.
      * tests/object-locking.ml: Likewise.
      * tools/virt-xml-validate.in: Likewise.
      3ad13c92
  25. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  26. 20 7月, 2012 1 次提交
  27. 30 3月, 2012 1 次提交
  28. 23 3月, 2012 4 次提交