1. 10 4月, 2019 1 次提交
  2. 04 2月, 2019 2 次提交
  3. 30 10月, 2018 1 次提交
  4. 28 7月, 2018 1 次提交
    • J
      util: clang is failing to compile due to unused variables. · 7f6d6b96
      Julio Faracco 提交于
      After some recent patches, clang is throwing some errors related to
      unused variables. This is not happening when we use GCC with -Werror
      enabled. Only clang reports this warning.
      
      make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src'
        CC       util/libvirt_util_la-virscsivhost.lo
        CC       util/libvirt_util_la-virusb.lo
        CC       util/libvirt_util_la-virmdev.lo
      util/virmdev.c:373:36: error: unused variable 'ret' [-Werror,-Wunused-variable]
          VIR_AUTOPTR(virMediatedDevice) ret = virMediatedDeviceListSteal(list, dev);
                                         ^
      1 error generated.
      Makefile:11579: recipe for target 'util/libvirt_util_la-virmdev.lo' failed
      make[3]: *** [util/libvirt_util_la-virmdev.lo] Error 1
      make[3]: *** Waiting for unfinished jobs....
      util/virscsivhost.c:112:37: error: unused variable 'tmp' [-Werror,-Wunused-variable]
          VIR_AUTOPTR(virSCSIVHostDevice) tmp = virSCSIVHostDeviceListSteal(list, dev);
                                          ^
      1 error generated.
      Makefile:11411: recipe for target 'util/libvirt_util_la-virscsivhost.lo' failed
      make[3]: *** [util/libvirt_util_la-virscsivhost.lo] Error 1
      util/virusb.c:511:31: error: unused variable 'ret' [-Werror,-Wunused-variable]
          VIR_AUTOPTR(virUSBDevice) ret = virUSBDeviceListSteal(list, dev);
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      7f6d6b96
  5. 27 7月, 2018 3 次提交
  6. 15 5月, 2018 1 次提交
  7. 18 4月, 2018 1 次提交
    • M
      virobject: Introduce VIR_CLASS_NEW() macro · 10f94828
      Michal Privoznik 提交于
      So far we are repeating the following lines over and over:
      
        if (!(virSomeObjectClass = virClassNew(virClassForObject(),
                                   "virSomeObject",
                                   sizeof(virSomeObject),
                                   virSomeObjectDispose)))
            return -1;
      
      While this works, it is impossible to do some checking. Firstly,
      the class name (the 2nd argument) doesn't match the name in the
      code in all cases (the 3rd argument). Secondly, the current style
      is needlessly verbose. This commit turns example into following:
      
        if (!(VIR_CLASS_NEW(virSomeObject,
                            virClassForObject)))
            return -1;
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      10f94828
  8. 19 3月, 2018 1 次提交
    • E
      util: mdev: Improve the error msg on non-existent mdev prior to VM start · 3d2e4c3e
      Erik Skultety 提交于
      What one currently gets is:
      failed to read '/sys/bus/mdev/devices/<UUID>/mdev_type/device_api': No
      such file or directory
      
      This indicates that something is missing within the device's sysfs tree
      which likely might be not be the case here because the device simply
      doesn't exist yet. So, when creating our internal mdev obj, let's check
      whether the device exists first prior to trying to verify the
      user-provided model within domain XML.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      3d2e4c3e
  9. 08 3月, 2018 1 次提交
  10. 29 1月, 2018 2 次提交
  11. 18 5月, 2017 1 次提交
  12. 09 5月, 2017 1 次提交
  13. 04 5月, 2017 3 次提交
    • E
      mdev: Fix mingw build by adding a check for non-NULL pointer · 574718d3
      Erik Skultety 提交于
      This patch fixes the following MinGW error (although actually being a
      false positive):
      
      ../../src/util/virmdev.c: In function 'virMediatedDeviceListMarkDevices':
      ../../src/util/virmdev.c:453:21: error: potential null pointer
      dereference [-Werror=null-dereference]
                const char *mdev_path = mdev->path;
                            ^~~~~~~~~
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      574718d3
    • E
      mdev: Fix daemon crash on domain shutdown after reconnect · 92e30a4d
      Erik Skultety 提交于
      The problem resides in virHostdevUpdateActiveMediatedDevices which gets
      called during qemuProcessReconnect. The issue here is that
      virMediatedDeviceListAdd takes a pointer to the item to be added to the
      list to which VIR_APPEND_ELEMENT is used, which also clears the pointer.
      However, in this case only the local copy of the pointer got cleared,
      leaving the original pointing to valid memory. To sum it up, during
      cleanup phase, the original pointer is freed and the daemon crashes
      basically any time it would access it.
      
      Backtrace:
      0x00007ffff3ccdeba in __strcmp_sse2_unaligned
      0x00007ffff72a444a in virMediatedDeviceListFindIndex
      0x00007ffff7241446 in virHostdevReAttachMediatedDevices
      0x00007fffc60215d9 in qemuHostdevReAttachMediatedDevices
      0x00007fffc60216dc in qemuHostdevReAttachDomainDevices
      0x00007fffc6046e6f in qemuProcessStop
      0x00007fffc6091596 in processMonitorEOFEvent
      0x00007fffc6091793 in qemuProcessEventHandler
      0x00007ffff7294bf5 in virThreadPoolWorker
      0x00007ffff7294184 in virThreadHelper
      0x00007ffff3fdc3c4 in start_thread () from /lib64/libpthread.so.0
      0x00007ffff3d269cf in clone () from /lib64/libc.so.6
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1446455Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Reviewed-by: NLaine Stump <laine@laine.org>
      92e30a4d
    • E
      util: mdev: Use a local variable instead of a direct pointer access · 2739a983
      Erik Skultety 提交于
      Use a local variable to hold data, rather than accessing the pointer
      after calling virMediatedDeviceListAdd (therefore VIR_APPEND_ELEMENT).
      Although not causing an issue at the moment, this change is a necessary
      prerequisite for tweaking virMediatedDeviceListAdd in a separate patch,
      which will take a reference for the source pointer (instead of pointer
      value) and will clear it along the way.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Reviewed-by: NLaine Stump <laine@laine.org>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      2739a983
  14. 28 3月, 2017 1 次提交
    • R
      virmdev: fix build on non-Linux · 8ffffae9
      Roman Bogorodskiy 提交于
       - Make virMediatedDeviceNew() stub args match its prototype
       - Fix typo: virRerportError -> virReportError
       - Move MDEV_SYSFS_DEVICES definition out of the #ifdef __linux__ block
         so we don't have to stub virMediatedDeviceGetSysfsPath()
      8ffffae9
  15. 27 3月, 2017 1 次提交