1. 21 7月, 2014 1 次提交
    • P
      util: Check return value from virStrToLong* functions · 5df81317
      Peter Krempa 提交于
      We do so in the vast majority of places, so there's no problem of adding
      the attribute to enforce it by the complier and fix a few leftover
      places.
      
      This was originally pointed out by Coverity as a recent change triggered
      it's warning that our code checked the vast majority of returns from
      virStrToLong_ui.
      5df81317
  2. 18 7月, 2014 1 次提交
  3. 22 4月, 2014 1 次提交
  4. 25 3月, 2014 1 次提交
  5. 18 3月, 2014 1 次提交
  6. 10 3月, 2014 1 次提交
  7. 20 1月, 2014 1 次提交
  8. 10 12月, 2013 2 次提交
  9. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: xen · 86f6748b
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/libxl/libxl_driver.c: Consistently use commas.
      * src/xen/xend_internal.c: Likewise.
      * src/xen/xs_internal.c: Likewise.
      * src/xenapi/xenapi_driver.c: Likewise.
      * src/xenapi/xenapi_utils.c: Likewise.
      * src/xenxs/xen_sxpr.c: Likewise.
      * src/xenxs/xen_xm.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      86f6748b
  10. 11 7月, 2013 1 次提交
  11. 10 7月, 2013 1 次提交
  12. 23 5月, 2013 1 次提交
  13. 21 5月, 2013 1 次提交
  14. 09 5月, 2013 8 次提交
  15. 11 2月, 2013 1 次提交
  16. 21 12月, 2012 4 次提交
  17. 02 11月, 2012 1 次提交
  18. 28 9月, 2012 1 次提交
    • J
      Fix compilation of legacy xen driver with Xen 4.2 · 416eca18
      Jim Fehlig 提交于
      In Xen 4.2, xs.h is deprecated in favor of xenstore.h.  xs.h now
      contains
      
      #warning xs.h is deprecated use xenstore.h instead
      #include <xenstore.h>
      
      which fails compilation when warnings are treated as errors.
      
      Introduce a configure-time check for xenstore.h and if found,
      use it instead of xs.h.
      416eca18
  19. 21 9月, 2012 1 次提交
  20. 24 8月, 2012 1 次提交
    • P
      xen-xs: fix uuid of renamed domain · fbe7a883
      Philipp Hahn 提交于
      When the XenStore tdb lives persistently and is not cleared between host
      reboots, Xend (version 3.4 and 4.1) re-creates the domain information
      located in XenStore below /vm/$UUID. (According to the xen-3.2-commit
      hg265950e3df69 to fix a problem when locally migrating a domain to the
      host itself.)
      
      When doing so a version number is added to the UUID separated by one
      dash, which confuses xenStoreDomainIntroduced(): It iterates over all
      domains and tries to lookup all inactive domains using
      xenStoreDomainGetUUID(), which fails if the running domain is renamed:
      virUUIDParse() fails to parse the versioned UUID and the domain is
      flagged as missing. When this happens the function delays .2s and
      re-tries 20 times again, multiplied by the number of renamed VMs.
        14:48:38.878: 4285: debug : xenStoreDomainIntroduced:1354 : Some domains were missing, trying again
      
      This adds a significant delay:
        # time virsh list >/dev/null
        real    0m6.529s
        # xenstore-list /vm
        00000000-0000-0000-0000-000000000000
        00000000-0000-0000-0000-000000000000-1
        00000000-0000-0000-0000-000000000000-2
        00000000-0000-0000-0000-000000000000-3
        00000000-0000-0000-0000-000000000000-4
        00000000-0000-0000-0000-000000000000-5
        7c06121e-90c3-93d4-0126-50481d485cca
        00000000-0000-0000-0000-000000000000-6
        00000000-0000-0000-0000-000000000000-7
        144ad19d-dfb4-2f80-8045-09196bb8784f
        00000000-0000-0000-0000-000000000000-8
        144ad19d-dfb4-2f80-8045-09196bb8784f-1
        00000000-0000-0000-0000-000000000000-9
        00000000-0000-0000-0000-000000000000-10
        00000000-0000-0000-0000-000000000000-11
        00000000-0000-0000-0000-000000000000-12
        00000000-0000-0000-0000-000000000000-13
        00000000-0000-0000-0000-000000000000-14
        144ad19d-dfb4-2f80-8045-09196bb8784f-2
        00000000-0000-0000-0000-000000000000-15
        144ad19d-dfb4-2f80-8045-09196bb8784f-3
        00000000-0000-0000-0000-000000000000-16
      
      The patch adds truncation of the UUID as read from the XenStore path
      before passing it to virUUIDParse().
      
      The same issue is reported at
      <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666135>
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      fbe7a883
  21. 27 7月, 2012 1 次提交
    • O
      maint: Use consistent copyright. · a4bcefbc
      Osier Yang 提交于
      This is a follow up patch of commit f9ce7dad, it modifies all
      the files which declare the copyright like "See COPYING.LIB for
      the License of this software" to use the detailed/consistent one.
      
      And deserts the outdated comments like:
      
       * libvirt-qemu.h:
       * Summary: qemu specific interfaces
       * Description: Provides the interfaces of the libvirt library to handle
       *              qemu specific methods
       *
       * Copy:  Copyright (C) 2010, 2012 Red Hat, Inc.
      
      Uses the more compact style like:
      
       * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
       *
       * Copyright (C) 2010, 2012 Red Hat, Inc.
      a4bcefbc
  22. 20 7月, 2012 1 次提交
  23. 27 3月, 2012 1 次提交
    • M
      Cleanup for a return statement in source files · 9943276f
      Martin Kletzander 提交于
      Return statements with parameter enclosed in parentheses were modified
      and parentheses were removed. The whole change was scripted, here is how:
      
      List of files was obtained using this command:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$'
      
      Found files were modified with this command:
      sed -i -e                                                                 \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      
      Then checked for nonsense.
      
      The whole command looks like this:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      9943276f
  24. 08 3月, 2012 1 次提交
    • E
      xml: use long long internally, to centralize overflow checks · 73b99771
      Eric Blake 提交于
      On 64-bit platforms, unsigned long and unsigned long long are
      identical, so we don't have to worry about overflow checks.
      On 32-bit platforms, anywhere we narrow unsigned long long back
      to unsigned long, we have to worry about overflow; it's easier
      to do this in one place by having most of the code use the same
      or wider types, and only doing the narrowing at the last minute.
      Therefore, the memory set commands remain unsigned long, and
      the memory get command now centralizes the overflow check into
      libvirt.c, so that drivers don't have to repeat the work.
      
      This also fixes a bug where xen returned the wrong value on
      failure (most APIs return -1 on failure, but getMaxMemory
      must return 0 on failure).
      
      * src/driver.h (virDrvDomainGetMaxMemory): Use long long.
      * src/libvirt.c (virDomainGetMaxMemory): Raise overflow.
      * src/test/test_driver.c (testGetMaxMemory): Fix driver.
      * src/rpc/gendispatch.pl (name_to_ProcName): Likewise.
      * src/xen/xen_hypervisor.c (xenHypervisorGetMaxMemory): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainGetMaxMemory): Likewise.
      * src/xen/xend_internal.c (xenDaemonDomainGetMaxMemory):
      Likewise.
      * src/xen/xend_internal.h (xenDaemonDomainGetMaxMemory):
      Likewise.
      * src/xen/xm_internal.c (xenXMDomainGetMaxMemory): Likewise.
      * src/xen/xm_internal.h (xenXMDomainGetMaxMemory): Likewise.
      * src/xen/xs_internal.c (xenStoreDomainGetMaxMemory): Likewise.
      * src/xen/xs_internal.h (xenStoreDomainGetMaxMemory): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainGetMaxMemory):
      Likewise.
      * src/esx/esx_driver.c (esxDomainGetMaxMemory): Likewise.
      * src/libxl/libxl_driver.c (libxlDomainGetMaxMemory): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainGetMaxMemory): Likewise.
      * src/lxc/lxc_driver.c (lxcDomainGetMaxMemory): Likewise.
      * src/uml/uml_driver.c (umlDomainGetMaxMemory): Likewise.
      73b99771
  25. 05 1月, 2012 1 次提交
    • J
      Fix xenstore serial console path for HVM guests · beeea90a
      Jim Fehlig 提交于
      The console path in xenstore is /local/domain/<id>/console/tty
      for PV guests (PV console) and /local/domain/<id>/serial/0/tty
      (serial console) for HVM guests.  Similar to Xen's in-tree console
      client, read the correct path for PV vs HVM.
      beeea90a
  26. 04 12月, 2011 1 次提交
    • E
      maint: fix improper use of 'an' · 3a9ce767
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=648855 mentioned a
      misuse of 'an' where 'a' is proper; that has since been fixed,
      but a search found other problems (some were a spelling error for
      'and', while most were fixed by 'a').
      
      * daemon/stream.c: Fix grammar.
      * src/conf/domain_conf.c: Likewise.
      * src/conf/domain_event.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/esx/esx_vi.c: Likewise.
      * src/rpc/virnetclient.c: Likewise.
      * src/rpc/virnetserverprogram.c: Likewise.
      * src/storage/storage_backend_fs.c: Likewise.
      * src/util/conf.c: Likewise.
      * src/util/dnsmasq.c: Likewise.
      * src/util/iptables.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * src/xen/xs_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      3a9ce767
  27. 29 7月, 2011 2 次提交
    • E
      xen: drop unused callbacks · 1b3765fd
      Eric Blake 提交于
      Found by:
      
      for f in $(sed -n 's/.*Drv[^ ]* \([^;]*\);.*/\1/p' src/xen/xen_driver.h)
      do
        git grep "\(\.\|->\)$f\b" src/xen
      done | cat
      
      and looking through the resulting list to see which callback struct
      members are still necessary.
      
      * src/xen/xen_driver.h (xenUnifiedDriver): Drop all callbacks that
      are only used directly.
      * src/xen/xen_hypervisor.c (xenHypervisorDriver): Shrink list.
      * src/xen/xen_inotify.c (xenInotifyDriver): Likewise.
      * src/xen/xend_internal.c (xenDaemonDriver): Likewise.
      * src/xen/xm_internal.c (xenXMDriver): Likewise.
      * src/xen/xs_internal.c (xenStoreDriver): Likewise.
      1b3765fd
    • E
      xen: cleanup callback struct · f859919f
      Eric Blake 提交于
      Using C99 initializers and xen-specific prefixes will make it
      so that future patches are less likely to add callback members
      to the xenUnifiedDriver struct, since the goal is to get rid
      of the callback struct in the first place.
      
      * src/xen/xen_driver.h (xenUnifiedDriver): Rename all struct
      members, to make it obvious which ones are still in use.
      * src/xen/xen_driver.c: Update all callers.
      * src/xen/xen_hypervisor.c (xenHypervisorDriver): Rewrite with C99
      initializers.
      * src/xen/xend_internal.c (xenDaemonDriver): Likewise.
      * src/xen/xs_internal.c (xenStoreDriver): Likewise.
      * src/xen/xm_internal.c (xenXMDriver): Likewise.
      * src/xen/xen_inotify.c (xenInotifyDriver): Likewise.
      f859919f
  28. 22 7月, 2011 1 次提交
    • E
      build: fix bugs with destroyFlags patches · 934fdcb3
      Eric Blake 提交于
      Build failure on xenapi_driver from compiler warnings (flags was unused).
      
      Build failure on xen (incorrect number of arguments).  And in fixing
      that, I obeyed the comments of struct xenUnifiedDriver that state
      that we want to minimize the number of callback functions in that
      struct, not add to it.
      
      * src/xen/xen_driver.c (xenUnifiedDomainDestroyFlags): Use correct
      arguments.
      (xenUnifiedDomainDestroy): Simplify.
      * src/xen/xen_driver.h (xenUnifiedDriver): Remove unused callback.
      * src/xen/xen_hypervisor.c (xenHypervisorDestroyDomain): Likewise.
      * src/xen/xend_internal.c (xenDaemonDomainDestroy): Likewise.
      * src/xen/xend_internal.h (xenDaemonDomainDestroyFlags): Likewise.
      * src/xen/xm_internal.c (xenXMDriver): Likewise.
      * src/xen/xs_internal.c (xenStoreDriver): Likewise.
      * src/xen/xen_inotify.c (xenInotifyDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainDestroyFlags): Reject
      unknown flags.
      934fdcb3