1. 06 9月, 2016 1 次提交
    • M
      Make sure sys/types.h is included after sys/sysmacros.h · f3f15cc2
      Michal Privoznik 提交于
      In the latest glibc, major() and minor() functions are marked as
      deprecated (glibc commit dbab6577):
      
        CC       util/libvirt_util_la-vircgroup.lo
      util/vircgroup.c: In function 'virCgroupGetBlockDevString':
      util/vircgroup.c:768:5: error: '__major_from_sys_types' is deprecated:
        In the GNU C Library, `major' is defined by <sys/sysmacros.h>.
        For historical compatibility, it is currently defined by
        <sys/types.h> as well, but we plan to remove this soon.
        To use `major', include <sys/sysmacros.h> directly.
        If you did not intend to use a system-defined macro `major',
        you should #undef it after including <sys/types.h>.
        [-Werror=deprecated-declarations]
           if (virAsprintf(&ret, "%d:%d ", major(sb.st_rdev), minor(sb.st_rdev)) < 0)
           ^~
      In file included from /usr/include/features.h:397:0,
                       from /usr/include/bits/libc-header-start.h:33,
                       from /usr/include/stdio.h:28,
                       from ../gnulib/lib/stdio.h:43,
                       from util/vircgroup.c:26:
      /usr/include/sys/sysmacros.h:87:1: note: declared here
       __SYSMACROS_DEFINE_MAJOR (__SYSMACROS_FST_IMPL_TEMPL)
       ^
      
      Moreover, in the glibc commit, there's suggestion to keep
      ordering of including of header files as implemented here.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f3f15cc2
  2. 05 8月, 2016 1 次提交
    • M
      lxcDomainCreateXMLWithFiles: Avoid crash · 5f5a5a42
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1363773
      
      Imagine that you're creating a transient domain, but for some reason,
      starting it fails. That is virLXCProcessStart() returns an error. With
      current code, in the error handling code the domain object is removed
      from the domain object list, @vm is set to NULL and controls jump to
      enjob label where virLXCDomainObjEndJob() is called which dereference vm
      leading to instant crash.
      
      The fix is to end the job in the error handling code and only after that
      remove the domain from the list and jump onto cleanup label instead of
      endjob.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5f5a5a42
  3. 24 7月, 2016 1 次提交
  4. 07 7月, 2016 2 次提交
  5. 17 6月, 2016 1 次提交
  6. 10 6月, 2016 5 次提交
  7. 08 6月, 2016 9 次提交
  8. 07 6月, 2016 2 次提交
  9. 03 6月, 2016 1 次提交
    • M
      Fix building with -Og · 3470cd86
      Martin Kletzander 提交于
      When building using -Og, gcc sees that some variables can be used
      uninitialized  It can be debatable whether it is possible with our
      codeflow, but functions should be self-contained and initializations are
      always good.  The return instead of goto is due to actualType being used
      in the cleanup.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      3470cd86
  10. 27 5月, 2016 1 次提交
  11. 25 5月, 2016 2 次提交
    • J
      lxc: Fix lxcDomainDestroyFlags endjob processing · cb0159df
      John Ferlan 提交于
      Commit id '15ccb0db' added job functions for the lxc driver; however,
      for shutdown and nonpersistent path, the vm was removed from the domain
      object list and the vm pointer cleared before the endjob.
      
      Adjust the code to perform the endjob first and then perform the
      ObjListRemove as long as the vm wasn't NULL. This follows more closely
      models from qemu and libxl
      
      Found by Coverity (FORWARD_NULL)
      cb0159df
    • L
      lxc: support <interface type='ethernet'> · 002b7704
      Laine Stump 提交于
      This is identical to type='bridge', but without the "connect to a
      bridge" part, so it can be handled by using the same functions (and
      often even the same cases in switch statements), after renaming
      virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap()
      and enhancing it to skip bridge-related items when brname == NULL.
      
      To be truly useful, we need to support setting the ip address on the
      host side veth as well as guest side veth (already supported for
      type='bridge'), as well as setting the peer address for both.
      
      The <script> element (supported by type='ethernet' in qemu) isn't
      supported in this patch. An error is logged at domain start time if it
      is encountered. This may be changed in a later patch.
      002b7704
  12. 24 5月, 2016 2 次提交
  13. 20 5月, 2016 7 次提交
  14. 09 5月, 2016 1 次提交
    • P
      lxc: Fix wrong error message on disk hotplug · 5e9d56f8
      Peter Krempa 提交于
      Commit 36025c55 tried to improve error reporting for <disk type="lun">
      but reused the code in LXC which doesn't care about the actual disk
      type. The error messages would then contain a bogous hint that the
      config for the 'lun' device is invalid which might not be the case.
      
      Re-do the relevant portion of the commit with the original message.
      5e9d56f8
  15. 19 4月, 2016 1 次提交
  16. 04 3月, 2016 1 次提交
  17. 17 2月, 2016 1 次提交
    • P
      util: cgroup: Allow ignoring EACCES in virCgroup(Allow|Deny)DevicePath · cf113e8d
      Peter Krempa 提交于
      When adding disk images to ACL we may call those functions on NFS
      shares. In that case we might get an EACCES, which isn't really relevant
      since NFS would not hold a block device. This patch adds a flag that
      allows to stop reporting an error on EACCES to avoid spaming logs.
      
      Currently there's no functional change.
      cf113e8d
  18. 08 2月, 2016 1 次提交