1. 14 10月, 2019 1 次提交
  2. 10 9月, 2019 1 次提交
    • D
      util: activate directory override when used from library · b1b878c5
      Daniel P. Berrangé 提交于
      The Perl bindings for libvirt use the test driver for unit tests. This
      tries to load the cpu_map/index.xml file, and when run from an
      uninstalled build will fail.
      
      The problem is that virFileActivateDirOverride is called by our various
      binaries like libvirtd, virsh, but is not called when a 3rd party app
      uses libvirt.so
      
      To deal with this we allow the LIBVIRT_DIR_OVERRIDE=1 env variable to be
      set and make virInitialize look for this. The 'run' script will set it,
      so now build using this script to run against an uninstalled tree we
      will correctly resolve files to the source tree.
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      b1b878c5
  3. 06 9月, 2019 1 次提交
    • J
      util: Set backing file name for LOOP_GET_STATUS64 queries. · 149bbc52
      Julio Faracco 提交于
      This is an issue for LXC loop devices when you are trying to get loop
      devices info using `ioctl`. Modern apps uses `/sys/dev/block` to grab
      information about devices, but if you use the method mention you won't
      be able to retrive the associated file with that loop device. See
      example below from cryptsetup sources:
      
          static char *_ioctl_backing_file(const char *loop)
          {
              struct loop_info64 lo64 = {0};
              int loop_fd;
      
              loop_fd = open(loop, O_RDONLY);
              if (loop_fd < 0)
                  return NULL;
      
              if (ioctl(loop_fd, LOOP_GET_STATUS64, &lo64) < 0) {
                  close(loop_fd);
                  return NULL;
              }
      
              lo64.lo_file_name[LO_NAME_SIZE-2] = '*';
              lo64.lo_file_name[LO_NAME_SIZE-1] = 0;
      
              close(loop_fd);
              return strdup((char*)lo64.lo_file_name);
          }
      
      It will return an empty string because lo_file_name was not set.
      Function `virFileLoopDeviceOpenSearch()` is using `ioctl` to query data,
      but it is not checking `lo_file_name` field.
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      149bbc52
  4. 07 8月, 2019 3 次提交
  5. 19 7月, 2019 1 次提交
  6. 03 7月, 2019 3 次提交
  7. 10 4月, 2019 1 次提交
  8. 03 4月, 2019 1 次提交
  9. 14 3月, 2019 1 次提交
  10. 07 3月, 2019 3 次提交
  11. 26 2月, 2019 1 次提交
  12. 25 2月, 2019 3 次提交
  13. 28 1月, 2019 1 次提交
  14. 19 12月, 2018 1 次提交
  15. 19 10月, 2018 2 次提交
  16. 10 10月, 2018 3 次提交
  17. 03 10月, 2018 1 次提交
  18. 24 9月, 2018 1 次提交
  19. 20 9月, 2018 1 次提交
  20. 17 9月, 2018 1 次提交
  21. 12 9月, 2018 1 次提交
  22. 14 8月, 2018 1 次提交
  23. 15 7月, 2018 1 次提交
  24. 14 7月, 2018 3 次提交
  25. 26 6月, 2018 1 次提交
    • J
      util: fix mount issue by moving NULL value to "none" in syscall. · 794b576c
      Julio Faracco 提交于
      After running libvirt daemon with valgrind tools, some errors are
      appearing when you try to start a domain. One example:
      
      ==18012== Syscall param mount(type) points to unaddressable byte(s)
      ==18012==    at 0x6FEE3CA: mount (syscall-template.S:78)
      ==18012==    by 0x531344D: virFileMoveMount (virfile.c:3828)
      ==18012==    by 0x27FE7675: qemuDomainBuildNamespace (qemu_domain.c:11501)
      ==18012==    by 0x2800C44E: qemuProcessHook (qemu_process.c:2870)
      ==18012==    by 0x52F7E1D: virExec (vircommand.c:726)
      ==18012==    by 0x52F7E1D: virCommandRunAsync (vircommand.c:2477)
      ==18012==    by 0x52F4EDD: virCommandRun (vircommand.c:2309)
      ==18012==    by 0x2800A731: qemuProcessLaunch (qemu_process.c:6235)
      ==18012==    by 0x2800D6B4: qemuProcessStart (qemu_process.c:6569)
      ==18012==    by 0x28074876: qemuDomainObjStart (qemu_driver.c:7314)
      ==18012==    by 0x280522EB: qemuDomainCreateWithFlags (qemu_driver.c:7367)
      ==18012==    by 0x55484BF: virDomainCreate (libvirt-domain.c:6531)
      ==18012==    by 0x12CDBD: remoteDispatchDomainCreate (remote_daemon_dispatch_stubs.h:4350)
      ==18012==    by 0x12CDBD: remoteDispatchDomainCreateHelper (remote_daemon_dispatch_stubs.h:4326)
      ==18012==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
      
      Some documentation recommends to use "none" when you don't have a
      filesystem type to use. Specially, for bind and move actions.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      794b576c
  26. 08 6月, 2018 1 次提交
  27. 07 6月, 2018 1 次提交