1. 16 5月, 2011 2 次提交
  2. 13 5月, 2011 1 次提交
  3. 12 5月, 2011 4 次提交
    • E
      nwfilter: drop unused flag argument · 88d03d4f
      Eric Blake 提交于
      The public API and RPC over-the-wire format have no flags argument,
      so neither should the internal callback API.  This simplifies the
      RPC generator.
      
      * src/driver.h (virDrvNWFilterDefineXML): Drop argument that does
      not match public API.
      * src/nwfilter/nwfilter_driver.c (nwfilterDefine): Likewise.
      * src/libvirt.c (virNWFilterDefineXML): Likewise.
      * daemon/remote_generator.pl: Drop special case.
      88d03d4f
    • E
      build: wrap macro body in one-shot do-while loop · 5c129f74
      Eric Blake 提交于
      * src/libvirt.c (VIR_DOMAIN_DEBUG_1): Convert to single statement.
      Suggested by Jiri Denemark.
      5c129f74
    • E
      build: drop need for VIR_DOMAIN_DEBUG0() · 5bc168ed
      Eric Blake 提交于
      This one's tricker than the VIR_DEBUG0() removal, but the end
      result is still C99 compliant, and reasonable with enough comments.
      
      * src/libvirt.c (VIR_ARG10, VIR_HAS_COMMA)
      (VIR_DOMAIN_DEBUG_EXPAND, VIR_DOMAIN_DEBUG_PASTE): New macros.
      (VIR_DOMAIN_DEBUG): Rewrite to handle one argument, moving
      multi-argument guts to...
      (VIR_DOMAIN_DEBUG_1): New macro.
      (VIR_DOMAIN_DEBUG0): Rename to VIR_DOMAIN_DEBUG_0.
      5bc168ed
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4
  4. 11 5月, 2011 2 次提交
  5. 10 5月, 2011 1 次提交
  6. 26 4月, 2011 1 次提交
  7. 21 4月, 2011 1 次提交
  8. 17 4月, 2011 1 次提交
  9. 09 4月, 2011 3 次提交
  10. 08 4月, 2011 1 次提交
  11. 05 4月, 2011 1 次提交
  12. 01 4月, 2011 1 次提交
  13. 29 3月, 2011 1 次提交
    • D
      Add public APIs for storage volume upload/download · 7300f68d
      Daniel P. Berrange 提交于
      New APIs are added allowing streaming of content to/from
      storage volumes.
      
      * include/libvirt/libvirt.h.in: Add virStorageVolUpload and
        virStorageVolDownload APIs
      * src/driver.h, src/libvirt.c, src/libvirt_public.syms: Stub
        code for new APIs
      * src/storage/storage_driver.c, src/esx/esx_storage_driver.c:
        Add dummy entries in driver table for new APIs
      7300f68d
  14. 22 3月, 2011 1 次提交
    • D
      Add public API for setting migration speed on the fly · cb4aba9b
      Daniel P. Berrange 提交于
      It is possible to set a migration speed limit when starting
      migration. This new API allows the speed limit to be changed
      on the fly to adjust to changing conditions
      
      * src/driver.h, src/libvirt.c, src/libvirt_public.syms,
        include/libvirt/libvirt.h.in: Add virDomainMigrateSetMaxSpeed
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c,
        src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        src/remote/remote_driver.c, src/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/vmware/vmware_driver.c, src/xen/xen_driver.c,
        src/libxl/libxl_driver.c: Stub new API
      cb4aba9b
  15. 19 3月, 2011 1 次提交
    • T
      update virGetVersion description · 83bc4fa7
      Tiziano Mueller 提交于
      The current description suggests that you always have to provide
      a valid typeVer pointer. But if you want only the libvirt version
      it's also possible to set type and typeVer to NULL to skip the
      hypervisor part.
      83bc4fa7
  16. 18 3月, 2011 1 次提交
    • J
      Add libxenlight driver · 2b84e445
      Jim Fehlig 提交于
      Add a new xen driver based on libxenlight [1], which is the primary
      toolstack starting with Xen 4.1.0.  The driver is stateful and runs
      privileged only.
      
      Like the existing xen-unified driver, the libxenlight driver is
      accessed with xen:// URI.  Driver selection is based on the status
      of xend.  If xend is running, the libxenlight driver will not load
      and xen:// connections are handled by xen-unified.  If xend is not
      running *and* the libxenlight driver is available, xen://
      connections are deferred to the libxenlight driver.
      
      V6:
       - Address several code style issues noted by Daniel Veillard
       - Make drive work with xen:/// URI
       - Hold domain object reference while domain is injected in
         libvirt event loop.  Race found and fixed by Markus Groß.
      
      V5:
       - Ensure events are unregistered when domain private data
         is destroyed.  Discovered and fixed by Markus Groß.
      
      V4:
       - Handle restart of libvirtd, reconnecting to previously
         started domains
       - Rebased to current master
       - Tested against Xen 4.1 RC7-pre (c/s 22961:c5d121fd35c0)
      
      V3:
        - Reserve vnc port within driver when autoport=yes
      
      V2:
        - Update to Xen 4.1 RC6-pre (c/s 22940:5a4710640f81)
        - Rebased to current master
        - Plug memory leaks found by Stefano Stabellini and valgrind
        - Handle SHUTDOWN_crash domain death event
      
      [1] http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00436.html
      2b84e445
  17. 15 3月, 2011 1 次提交
  18. 14 3月, 2011 1 次提交
    • G
      Add missing checks for read only connections · 71753cb7
      Guido Günther 提交于
      As pointed on CVE-2011-1146, some API forgot to check the read-only
      status of the connection for entry point which modify the state
      of the system or may lead to a remote execution using user data.
      The entry points concerned are:
        - virConnectDomainXMLToNative
        - virNodeDeviceDettach
        - virNodeDeviceReAttach
        - virNodeDeviceReset
        - virDomainRevertToSnapshot
        - virDomainSnapshotDelete
      
      * src/libvirt.c: fix the above set of entry points to error on read-only
                       connections
      71753cb7
  19. 11 3月, 2011 2 次提交
  20. 21 2月, 2011 1 次提交
    • E
      maint: kill all remaining uses of old DEBUG macro · 994e7567
      Eric Blake 提交于
      Done mechanically with:
      $ git grep -l '\bDEBUG0\? *(' | xargs -L1 sed -i 's/\bDEBUG0\? *(/VIR_&/'
      
      followed by manual deletion of qemudDebug in daemon/libvirtd.c, along
      with a single 'make syntax-check' fallout in the same file, and the
      actual deletion in src/util/logging.h.
      
      * src/util/logging.h (DEBUG, DEBUG0): Delete.
      * daemon/libvirtd.h (qemudDebug): Likewise.
      * global: Change remaining clients over to VIR_DEBUG counterpart.
      994e7567
  21. 16 2月, 2011 1 次提交
  22. 09 2月, 2011 1 次提交
  23. 26 1月, 2011 1 次提交
  24. 19 1月, 2011 4 次提交
    • D
      Remove redundant brackets around return values · f10d2095
      Daniel P. Berrange 提交于
      A large number of return values used 'return (0)' instead
      of simply 'return 0'. Remove all these redundant brackets
      so the style is consistent throughout the file
      
      * src/libvirt.c: Remove redundant brackets
      f10d2095
    • D
      Increase size of driver table to make UML work again · 921b3812
      Daniel P. Berrange 提交于
      The driver table only has 10 slots, but there are potentially
      11 drivers that need activating. Improve the error message
      when driver registration fails
      
      * src/libvirt.c: Increase driver table size & improve errors
      921b3812
    • D
      Turn libvirt.c error reporting functions into macros · 19d931d2
      Daniel P. Berrange 提交于
      The virLibConnError() function (and related ones) do not correctly
      report line number info. Turn them all into macros so line numbers
      are reported correctly. Drop the connection object in all of them
      since it is no longer used.
      
      Also from the virLibConnWarning() equivalents completely. Now
      that the Xen driver is running 100% inside libvirtd, those
      codepaths for secondary drivers cannot be reached.
      
      * src/libvirt.c: Replace error functions with macros
      19d931d2
    • M
      Simplify "NWFilterPool" to "NWFilter" · 2c0db5b5
      Matthias Bolte 提交于
      The public object is called NWFilter but the corresponding private
      object is called NWFilterPool. I don't see compelling reasons for this
      Pool suffix. One might argue that an NWFilter is a "pool" of rules, etc.
      
      Remove the Pool suffix from NWFilterPool. No functional change included.
      2c0db5b5
  25. 13 1月, 2011 1 次提交
  26. 11 1月, 2011 1 次提交
    • D
      Refactor the security drivers to simplify usage · d6623003
      Daniel P. Berrange 提交于
      The current security driver usage requires horrible code like
      
          if (driver->securityDriver &&
              driver->securityDriver->domainSetSecurityHostdevLabel &&
              driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver,
                                                                    vm, hostdev) < 0)
      
      This pair of checks for NULL clutters up the code, making the driver
      calls 2 lines longer than they really need to be. The goal of the
      patchset is to change the calling convention to simply
      
        if (virSecurityManagerSetHostdevLabel(driver->securityDriver,
                                              vm, hostdev) < 0)
      
      The first check for 'driver->securityDriver' being NULL is removed
      by introducing a 'no op' security driver that will always be present
      if no real driver is enabled. This guarentees driver->securityDriver
      != NULL.
      
      The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel'
      being non-NULL is hidden in a new abstraction called virSecurityManager.
      This separates the driver callbacks, from main internal API. The addition
      of a virSecurityManager object, that is separate from the virSecurityDriver
      struct also allows for security drivers to carry state / configuration
      information directly. Thus the DAC/Stack drivers from src/qemu which
      used to pull config from 'struct qemud_driver' can now be moved into
      the 'src/security' directory and store their config directly.
      
      * src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to
        use new virSecurityManager APIs
      * src/qemu/qemu_security_dac.c,  src/qemu/qemu_security_dac.h
        src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h:
        Move into src/security directory
      * src/security/security_stack.c, src/security/security_stack.h,
        src/security/security_dac.c, src/security/security_dac.h: Generic
        versions of previous QEMU specific drivers
      * src/security/security_apparmor.c, src/security/security_apparmor.h,
        src/security/security_driver.c, src/security/security_driver.h,
        src/security/security_selinux.c, src/security/security_selinux.h:
        Update to take virSecurityManagerPtr object as the first param
        in all callbacks
      * src/security/security_nop.c, src/security/security_nop.h: Stub
        implementation of all security driver APIs.
      * src/security/security_manager.h, src/security/security_manager.c:
        New internal API for invoking security drivers
      * src/libvirt.c: Add missing debug for security APIs
      d6623003
  27. 07 1月, 2011 1 次提交
    • O
      API: Improve log for domain related APIs · a98d8f0d
      Osier Yang 提交于
      Add VM name/UUID in log for domain related APIs.
      Format: "dom=%p, (VM: name=%s, uuid=%s), param0=%s, param1=%s
      
      *src/libvirt.c (introduce two macros: VIR_DOMAIN_DEBUG, and
      VIR_DOMAIN_DEBUG0)
      a98d8f0d
  28. 18 12月, 2010 1 次提交
  29. 17 12月, 2010 1 次提交