1. 30 3月, 2012 1 次提交
  2. 23 3月, 2012 1 次提交
  3. 25 2月, 2012 1 次提交
    • M
      Fixed URI parsing · 9f748277
      Martin Kletzander 提交于
      Function xmlParseURI does not remove square brackets around IPv6
      address when parsing. One of the solutions is making wrappers around
      functions working with xmlURI*. This assures that uri->server will be
      always properly assigned and it doesn't have to be changed when used
      on some new place in the code.
      For this purpose, functions virParseURI and virSaveURI were
      added. These function are wrappers around xmlParseURI and xmlSaveUri
      respectively.
      Also there is one new syntax check function to prohibit these functions
      anywhere else.
      
      File changes:
       - src/util/viruri.h        -- declaration
       - src/util/viruri.c        -- definition
       - src/libvirt_private.syms -- symbol export
       - src/Makefile.am          -- added source and header files
       - cfg.mk                   -- added sc_prohibit_xmlURI
       - all others               -- ID name and include fixes
      9f748277
  4. 28 1月, 2012 1 次提交
  5. 30 10月, 2011 1 次提交
    • M
      xenapi: Improve error reporting in xenapiOpen once again · 484460ec
      Matthias Bolte 提交于
      privP->session->error_description is a list and in order to get the
      complete error message all parts of the list should be concatenated.
      xenapiSessionErrorHandler does this when its third parameter is NULL.
      The current code discards all but the first part of the error message
      resulting in a potentially incomplete error message.
      
      This partly reverts 006be75e, that tried to avoid reporting
      a (null) in the error message. The actual problem is more general in
      returnErrorFromSession that might return NULL if there is no error.
      
      Make sure that returnErrorFromSession return non-NULL always. Also
      don't skip the last error message part.
      484460ec
  6. 15 6月, 2011 1 次提交
    • D
      support for Xen HVM Viridian (Hyper-V) enlightenment interface · c4bd6d96
      Daniel Gollub 提交于
      Introduce libvirt support for Xen HVM Viridian (Hyper-V) enlightenment
      interface guest feature.
      
       src/conf/domain_conf.c     |    3 ++-
       src/conf/domain_conf.h     |    1 +
       src/xen/xen_hypervisor.c   |   11 +++++++++++
       src/xenapi/xenapi_driver.c |    2 ++
       src/xenapi/xenapi_utils.c  |    2 ++
       src/xenxs/xen_sxpr.c       |    4 ++++
       src/xenxs/xen_xm.c         |   12 +++++++++++-
       7 files changed, 33 insertions(+), 2 deletions(-)
      c4bd6d96
  7. 06 5月, 2011 1 次提交
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  8. 17 4月, 2011 1 次提交
  9. 05 4月, 2011 1 次提交
    • E
      build: detect potentential uninitialized variables · 0d166c6b
      Eric Blake 提交于
      Even with -Wuninitialized (which is part of autobuild.sh
      --enable-compile-warnings=error), gcc does NOT catch this
      use of an uninitialized variable:
      
      {
        if (cond)
          goto error;
        int a = 1;
      error:
        printf("%d", a);
      }
      
      which prints 0 (supposing the stack started life wiped) if
      cond was true.  Clang will catch it, but we don't use clang
      as often.  Using gcc -Wjump-misses-init catches it, but also
      gives false positives:
      
      {
        if (cond)
          goto error;
        int a = 1;
        return a;
      error:
        return 0;
      }
      
      Here, a was never used in the scope of the error block, so
      declaring it after goto is technically fine (and clang agrees).
      However, given that our HACKING already documents a preference
      to C89 decl-before-statement, the false positive warning is
      enough of a prod to comply with HACKING.
      
      [Personally, I'd _really_ rather use C99 decl-after-statement
      to minimize scope, but until gcc can efficiently and reliably
      catch scoping and uninitialized usage bugs, I'll settle with
      the compromise of enforcing a coding standard that happens to
      reject false positives if it can also detect real bugs.]
      
      * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Wjump-misses-init.
      * src/util/util.c (__virExec): Adjust offenders.
      * src/conf/domain_conf.c (virDomainTimerDefParseXML): Likewise.
      * src/remote/remote_driver.c (doRemoteOpen): Likewise.
      * src/phyp/phyp_driver.c (phypGetLparNAME, phypGetLparProfile)
      (phypGetVIOSFreeSCSIAdapter, phypVolumeGetKey)
      (phypGetStoragePoolDevice)
      (phypVolumeGetPhysicalVolumeByStoragePool)
      (phypVolumeGetPath): Likewise.
      * src/vbox/vbox_tmpl.c (vboxNetworkUndefineDestroy)
      (vboxNetworkCreate, vboxNetworkDumpXML)
      (vboxNetworkDefineCreateXML): Likewise.
      * src/xenapi/xenapi_driver.c (getCapsObject)
      (xenapiDomainDumpXML): Likewise.
      * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise.
      * src/security/security_selinux.c (SELinuxGenNewContext):
      Likewise.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia):
      Likewise.
      * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetPtyPaths):
      Likewise.
      * src/qemu/qemu_driver.c (qemudDomainShutdown)
      (qemudDomainBlockStats, qemudDomainMemoryPeek): Likewise.
      * src/storage/storage_backend_iscsi.c
      (virStorageBackendCreateIfaceIQN): Likewise.
      * src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
      0d166c6b
  10. 14 1月, 2011 1 次提交
    • J
      Add support for HAP feature to xen drivers · 04197350
      Jim Fehlig 提交于
      xen-unstable c/s 16931 introduced a per-domain setting for hvm
      guests to enable/disable hardware assisted paging.  If disabled,
      software techniques such as shadow page tables are used.  If enabled,
      and the feature exists in underlying hardware, hardware support for
      paging is used.
      
      This provides implementation for mapping HAP setting to/from
      domxml/native formats in xen drivers.
      04197350
  11. 20 10月, 2010 1 次提交
    • E
      vcpu: support maxvcpu in domain_conf · 4617eedf
      Eric Blake 提交于
      Although this patch adds a distinction between maximum vcpus and
      current vcpus in the XML, the values should be identical for all
      drivers at this point.  Only in subsequent per-driver patches will
      a distinction be made.
      
      In general, virDomainGetInfo should prefer the current vcpus.
      
      * src/conf/domain_conf.h (_virDomainDef): Adjust vcpus to unsigned
      short, to match virDomainGetInfo limit.  Add maxvcpus member.
      * src/conf/domain_conf.c (virDomainDefParseXML)
      (virDomainDefFormat): parse and print out vcpu details.
      * src/xen/xend_internal.c (xenDaemonParseSxpr)
      (xenDaemonFormatSxpr): Manage both vcpu numbers, and require them
      to be equal for now.
      * src/xen/xm_internal.c (xenXMDomainConfigParse)
      (xenXMDomainConfigFormat): Likewise.
      * src/phyp/phyp_driver.c (phypDomainDumpXML): Likewise.
      * src/openvz/openvz_conf.c (openvzLoadDomains): Likewise.
      * src/openvz/openvz_driver.c (openvzDomainDefineXML)
      (openvzDomainCreateXML, openvzDomainSetVcpusInternal): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxDomainDefineXML):
      Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainDumpXML): Likewise.
      * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise.
      * src/esx/esx_vmx.c (esxVMX_ParseConfig, esxVMX_FormatConfig):
      Likewise.
      * src/qemu/qemu_conf.c (qemuBuildSmpArgStr)
      (qemuParseCommandLineSmp, qemuParseCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainHotplugVcpus): Likewise.
      * src/opennebula/one_conf.c (xmlOneTemplate): Likewise.
      4617eedf
  12. 13 10月, 2010 1 次提交
    • N
      XML parsing for memory tunables · d390fce4
      Nikunj A. Dadhania 提交于
      Adding parsing code for memory tunables in the domain xml file
      also change the internal define structures used for domain memory
      informations
      Adds a new specific test
      d390fce4
  13. 24 8月, 2010 1 次提交
    • E
      xenapi: support xenapi 5.6.0 headers · 5bf86904
      Eric Blake 提交于
      * src/xenapi/xenapi_driver.c (xenapiDomainGetInfo): Avoid using
      XEN_VM_POWER_STATE_UNKNOWN, which disappeared in newer xenapi.
      * src/xenapi/xenapi_utils.c (mapPowerState): Likewise.
      5bf86904
  14. 21 8月, 2010 2 次提交
    • M
      xenapi: Fix compile error in previous commit · d6fdde23
      Matthias Bolte 提交于
      d6fdde23
    • J
      Add actions to virDomainLifecycle enum · b9c10268
      Jim Fehlig 提交于
      Xen supports on_crash actions coredump-{destroy,restart}.  libvirt
      cannot parse config returned by xend that contains either of these
      actions
      
      xen52 # xm li -l test | grep on_crash
          (on_crash coredump-restart)
      xen52 # virsh dumpxml test
      error: internal error unknown lifecycle type coredump-restart
      
      This patch adds a new virDomainLifecycleCrash enum and appends
      the new options to existing destroy, restart, preserve, and
      rename-restart options.
      b9c10268
  15. 20 8月, 2010 1 次提交
    • E
      xenapi: avoid sprintf · 5da4302f
      Eric Blake 提交于
      * src/xenapi/xenapi_utils.h (createVifNetwork): Delete prototype.
      * src/xenapi/xenapi_utils.c (createVifNetwork): Change signature,
      and use virAsprintf.  Detect allocation failure.
      (createVMRecordFromXml): Adjust caller.
      5da4302f
  16. 04 4月, 2010 1 次提交
  17. 01 4月, 2010 1 次提交
  18. 31 3月, 2010 1 次提交
  19. 17 3月, 2010 1 次提交
  20. 15 3月, 2010 2 次提交