1. 20 7月, 2011 1 次提交
  2. 16 7月, 2011 1 次提交
    • E
      esx: reject unknown flags · ca122578
      Eric Blake 提交于
      Silently ignored flags get in the way of new features that
      use those flags.
      
      Regarding ESX migration flags - right now, ESX silently enforces
      VIR_MIGRATE_PERSIST_DEST, VIR_MIGRATE_UNDEFINE_SOURCE, and
      VIR_MIGRATE_LIVE, even if those flags were not supplied; it ignored
      other flags.  This patch does not change the implied bits (it permits
      but does not require them), but enforces only the supported bits.
      If further cleanup is needed to be more particular about migration
      flags, that should be a separate patch.
      
      * src/esx/esx_device_monitor.c (esxDeviceOpen): Reject unknown
      flags.
      * src/esx/esx_driver.c (esxOpen, esxDomainReboot)
      (esxDomainXMLFromNative, esxDomainXMLToNative)
      (esxDomainMigratePrepare, esxDomainMigratePerform)
      (esxDomainMigrateFinish): Likewise.
      * src/esx/esx_interface_driver.c (esxInterfaceOpen): Likewise.
      * src/esx/esx_network_driver.c (esxNetworkOpen): Likewise.
      * src/esx/esx_nwfilter_driver.c (esxNWFilterOpen): Likewise.
      * src/esx/esx_secret_driver.c (esxSecretOpen): Likewise.
      * src/esx/esx_storage_driver.c (esxStorageOpen): Likewise.
      ca122578
  3. 12 7月, 2011 3 次提交
    • M
      esx: Initialize all instances of esxVMX_Data to zero · 38ea116e
      Matthias Bolte 提交于
      To avoid using or freeing uninitialized memory or pointers.
      38ea116e
    • O
      esx: Fix a potential crash · 6ddb83ef
      Osier Yang 提交于
      Initialize ptr data.datastorePathWithoutFileName as NULL, otherwise
      it might cause crash when trying to free it in cleanup.
      6ddb83ef
    • M
      Add domain type checking · aa14709a
      Matthias Bolte 提交于
      The drivers were accepting domain configs without checking if those
      were actually meant for them. For example the LXC driver happily
      accepts configs with type QEMU.
      
      Add a check for the expected domain types to the virDomainDefParse*
      functions.
      aa14709a
  4. 08 7月, 2011 1 次提交
    • E
      drivers: prefer unsigned int for flags · 1740c381
      Eric Blake 提交于
      Now that the public APIs always use unsigned flags, the internal
      driver callbacks might as well do likewise.
      
      * src/driver.h (vrDrvOpen, virDrvDomainCoreDump)
      (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc)
      (virDrvNWFilterGetXMLDesc): Update type.
      * src/remote/remote_protocol.x (remote_open_args)
      (remote_domain_core_dump_args, remote_domain_get_xml_desc_args)
      (remote_network_get_xml_desc_args)
      (remote_nwfilter_get_xml_desc_args): Likewise.
      * src/test/test_driver.c: Update clients.
      * src/remote/remote_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xen_hypervisor.h: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xm_internal.c: Likewise.
      * src/xen/xm_internal.h: Likewise.
      * src/xen/xs_internal.c: Likewise.
      * src/xen/xs_internal.h: Likewise.
      * src/xen/xen_inotify.c: Likewise.
      * src/xen/xen_inotify.h: Likewise.
      * src/phyp/phyp_driver.c: Likewise.
      * src/openvz/openvz_driver.c: Likewise.
      * src/vmware/vmware_driver.c: Likewise.
      * src/vbox/vbox_driver.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xenapi/xenapi_driver.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/esx/esx_interface_driver.c: Likewise.
      * src/esx/esx_network_driver.c: Likewise.
      * src/esx/esx_storage_driver.c: Likewise.
      * src/esx/esx_device_monitor.c: Likewise.
      * src/esx/esx_secret_driver.c: Likewise.
      * src/esx/esx_nwfilter_driver.c: Likewise.
      * src/interface/netcf_driver.c: Likewise.
      * src/nwfilter/nwfilter_driver.c: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/secret/secret_driver.c: Likewise.
      * src/storage/storage_driver.c: Likewise.
      * src/node_device/node_device_hal.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/remote_protocol-structs: Likewise.
      1740c381
  5. 02 7月, 2011 1 次提交
    • E
      util: choose whether to require micro in version strings · 8ce1afff
      Eric Blake 提交于
      To avoid regressions, we let callers specify whether to require a
      minor and micro version.  Callers that were parsing uname() output
      benefit from defaulting to 0, whereas callers that were parsing
      version strings from other sources should not change in behavior.
      
      * src/util/util.c (virParseVersionString): Allow caller to choose
      whether to fail if minor or micro is missing.
      * src/util/util.h (virParseVersionString): Update signature.
      * src/esx/esx_driver.c (esxGetVersion): Update callers.
      * src/lxc/lxc_driver.c (lxcVersion): Likewise.
      * src/openvz/openvz_conf.c (openvzExtractVersionInfo): Likewise.
      * src/uml/uml_driver.c (umlGetVersion): Likewise.
      * src/vbox/vbox_MSCOMGlue.c (vboxLookupVersionInRegistry):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxExtractVersion): Likewise.
      * src/vmware/vmware_conf.c (vmwareExtractVersion): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiGetVersion): Likewise.
      Reported by Matthias Bolte.
      8ce1afff
  6. 14 6月, 2011 1 次提交
    • H
      Deprecate several CURRENT/LIVE/CONFIG enums · fbd7820b
      Hu Tao 提交于
      This patch deprecates following enums:
      
      VIR_DOMAIN_MEM_CURRENT
      VIR_DOMAIN_MEM_LIVE
      VIR_DOMAIN_MEM_CONFIG
      
      VIR_DOMAIN_VCPU_LIVE
      VIR_DOMAIN_VCPU_CONFIG
      
      VIR_DOMAIN_DEVICE_MODIFY_CURRENT
      VIR_DOMAIN_DEVICE_MODIFY_LIVE
      VIR_DOMAIN_DEVICE_MODIFY_CONFIG
      
      And modify internal codes to use virDomainModificationImpact.
      fbd7820b
  7. 08 6月, 2011 1 次提交
    • E
      esx: avoid dead code · 657ae229
      Eric Blake 提交于
      Detected by Coverity.  The beginning of the function already filtered
      out NULL objectContentList as invalid.  Further investigation shows:
      
      esxVI_RetrieveProperties is generated and returns a list of objects
      that match the given propertyFilterSpec.
      esxVI_LookupObjectContentByType then tests whether the result
      corresponds to the expected occurrence and reports an error otherwise.
      This simplifies the callers of  esxVI_LookupObjectContentByType, but
      due to the missing dereference the check was never performed because
      the code thought that at least one item was obtained. NULL represents
      an empty list. This is a potential segfault fix because callers of
      esxVI_LookupObjectContentByType that specified "required" occurrence
      assume *objectContentList to be non-NULL when
      esxVI_LookupObjectContentByType succeeds.
      
      * src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Check
      correct pointer.
      657ae229
  8. 07 6月, 2011 1 次提交
  9. 06 6月, 2011 2 次提交
  10. 29 5月, 2011 2 次提交
    • E
      sched: provide new API shims for remaining drivers · bb6cb66f
      Eric Blake 提交于
      Well, the remaining drivers that already had the get/set
      scheduler parameter functionality to begin with.
      
      For now, this blindly treats VIR_DOMAIN_SCHEDINFO_CURRENT as
      the only supported operation for these 5 domains; it will
      take domain-specific patches if more specific behavior is
      preferred.
      
      * src/esx/esx_driver.c (esxDomainGetSchedulerParameters)
      (esxDomainSetSchedulerParameters): Move guts...
      (esxDomainGetSchedulerParametersFlags)
      (esxDomainSetSchedulerParametersFlags): ...to new functions.
      * src/libxl/libxl_driver.c (libxlDomainGetSchedulerParameters)
      (libxlDomainSetSchedulerParameters)
      (libxlDomainGetSchedulerParametersFlags)
      (libxlDomainSetSchedulerParametersFlags): Likewise.
      * src/lxc/lxc_driver.c (lxcGetSchedulerParameters)
      (lxcSetSchedulerParameters, lxcGetSchedulerParametersFlags)
      (lxcSetSchedulerParametersFlags): Likewise.
      * src/test/test_driver.c (testDomainGetSchedulerParams)
      (testDomainSetSchedulerParams, testDomainGetSchedulerParamsFlags)
      (testDomainSetSchedulerParamsFlags): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainGetSchedulerParameters)
      (xenUnifiedDomainSetSchedulerParameters)
      (xenUnifiedDomainGetSchedulerParametersFlags)
      (xenUnifiedDomainSetSchedulerParametersFlags): Likewise.
      bb6cb66f
    • E
      maint: prefer newer API names internally · 163e5f04
      Eric Blake 提交于
      Rather mechanical in nature.
      
      * src/driver.h: Use newer virTypedParameter API names.
      * src/libvirt.c: Likewise.
      * daemon/remote.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xen_hypervisor.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      163e5f04
  11. 27 5月, 2011 1 次提交
    • M
      esx: Fix regression in absolute file name handling · 8357d91b
      Matthias Bolte 提交于
      Before commit 145d6cb0 (in August 2010) absolute file names
      in VMX and domain XML configs were handled correctly. But this got
      lost during the refactoring. The test cases didn't highlight this
      problem because they have their own set of file name handling
      functions. The actual ones require a real connection to an ESX
      server. Also the test case functions always worked correctly.
      
      Fix the regression and add a new in-the-wild VMX file that contains
      such a problematic absolute path. Even though this test case won't
      protect against new regressions.
      
      Reported by lofic (IRC nick)
      8357d91b
  12. 26 5月, 2011 1 次提交
  13. 25 5月, 2011 1 次提交
  14. 19 5月, 2011 1 次提交
  15. 17 5月, 2011 6 次提交
  16. 16 5月, 2011 5 次提交
    • D
      Add many version number annotations to drivers · 9b1ae97f
      Daniel P. Berrange 提交于
      Add many version number annotations to the internal driver
      tables, to allow hvsupport.html to display more accurate
      information
      9b1ae97f
    • D
      Convert all driver struct intializers to C99 style · 879d409e
      Daniel P. Berrange 提交于
      Change all the driver struct initializers to use the
      C99 style, leaving out unused fields. This will make
      it possible to add new APIs without changing every
      driver. eg change:
      
          qemudDomainResume, /* domainResume */
          qemudDomainShutdown, /* domainShutdown */
          NULL, /* domainReboot */
          qemudDomainDestroy, /* domainDestroy */
      
      to
      
          .domainResume = qemudDomainResume,
          .domainShutdown = qemudDomainShutdown,
          .domainDestroy = qemudDomainDestroy,
      
      And get rid of any existing C99 style initializersr which
      set NULL, eg change
      
           .listPools          = vboxStorageListPools,
           .numOfDefinedPools  = NULL,
           .listDefinedPools   = NULL,
           .findPoolSources    = NULL,
           .poolLookupByName   = vboxStoragePoolLookupByName,
      
      to
      
           .listPools          = vboxStorageListPools,
           .poolLookupByName   = vboxStoragePoolLookupByName,
      879d409e
    • D
      Tweak driver naming for consistency with public API · 360df019
      Daniel P. Berrange 提交于
      Fix some driver names:
      
        s/virDrvCPUCompare/virDrvCompareCPU/
        s/virDrvCPUBaseline/virDrvBaselineCPU/
        s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/
        s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/
        s/virDrvSecretListSecrets/virDrvListSecrets/
      
      And some driver struct field names:
      
        s/getFreeMemory/nodeGetFreeMemory/
      360df019
    • J
      Implement basic virDomainGetState in all drivers · 26d94012
      Jiri Denemark 提交于
      Reason is currently always set to 0 (i.e., *_UNKNOWN).
      26d94012
    • J
      Internal driver API for virDomainGetState · 6feb1341
      Jiri Denemark 提交于
      6feb1341
  17. 14 5月, 2011 6 次提交
  18. 13 5月, 2011 2 次提交
    • C
      xml: Use virXMLParse* helpers everywhere · b9e51e56
      Cole Robinson 提交于
      virt-aa-helper isn't even compile tested since I don't have the setup for
      it.
      
      v2:
          virt-aa-helper fixes from Eric
      b9e51e56
    • M
      screenshot: Defining the internal API · 3c386643
      Michal Privoznik 提交于
      * src/driver.h: Stub code for new API
      * src/esx/esx_driver.c, src/libxl/libxl_driver.c,
        src/lxc/lxc_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        rc/remote/remote_driver.c, rc/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/xen/xen_driver.h, src/xen/xen_hypervisor.c,
        src/xen/xen_inotify.c, src/xen/xend_internal.c,
        src/xen/xm_internal.c, src/xen/xs_internal.c,
        src/xenapi/xenapi_driver.c: Add dummy entries in driver
        table for new APIs
      3c386643
  19. 12 5月, 2011 1 次提交
    • 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
  20. 11 5月, 2011 2 次提交