1. 24 6月, 2014 1 次提交
    • M
      cmdFreepages: initialize @tmp · 8d8e1d9d
      Michal Privoznik 提交于
      In the 404bac14 the @tmp variable was introduced. It's purpose is to
      avoid typecasting when parsing --pagesize argument. However, if the
      argument is not presented, tmp may be used uninitialized resulting in
      bogus virNodeGetFreePages() API call:
      
      virsh freepages --cellno 2
      error: Failed to open file '/sys/devices/system/node/node2/hugepages/hugepages-4294967295kB/free_hugepages': No such file or directory
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8d8e1d9d
  2. 23 6月, 2014 14 次提交
    • R
      Fix closedir usage in virNumaGetPages · 4a82ef92
      Roman Bogorodskiy 提交于
      virNumaGetPages calls closedir(dir) in cleanup and dir could
      be NULL if we jump there from the failed opendir() call.
      
      While it's not harmful on Linux, FreeBSD libc crashes [1], so
      make sure that dir is not NULL before calling closedir.
      
      1: http://lists.freebsd.org/pipermail/freebsd-standards/2014-January/002704.html
      4a82ef92
    • D
      Add pkg-config files to allow deps to build against source tree · 60c343f6
      Daniel P. Berrange 提交于
      When testing language bindings it is useful to be able to build
      them against an uninstalled libvirt source tree. Add a dummy
      set of pkg-config files to allow for this. This can be used by
      setting
      
        export PKG_CONFIG_PATH=/path/to/libvirt/git/src
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      60c343f6
    • D
      Add pkg-config files for libvirt-qemu & libvirt-lxc · 65d8c92a
      Daniel P. Berrange 提交于
      For some reason there have never been pkg-config files created
      for the libvirt-qemu.so and libvirt-lxc.so libraries.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      65d8c92a
    • D
      Don't include @libs@ in libvirt.pc.in file · 1167751f
      Daniel P. Berrange 提交于
      The libvirt.pc file we install is ending up polluted with a
      load of compiler flags that should be private to the libvirt
      build. eg
      
      Libs: -L${libdir} -lvirt -ldl -O2 -g -pipe -Wall \
            -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
            -fstack-protector-strong --param=ssp-buffer-size=4 \
            -grecord-gcc-switches  -m64 -mtune=generic
      
      this is caused by including @libs@ in the Libs: line of the
      pkgconfig.pc.in file.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1167751f
    • M
      virnuma: Actually build huge page code · 9e72691b
      Michal Privoznik 提交于
      One of previous commits (e6258a33) tried to build the huge page code
      only on Linux since it's Linux centric indeed. But it failed miserably
      as it used 'WITH_LINUX' which is an automake conditional not a gcc
      one. In the sources we need to use __linux__.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9e72691b
    • L
      qemu: parse -device virtio-balloon · ef016226
      Laine Stump 提交于
      There are no options to parse here other than the name of the device,
      and all three possible device names have the same prefix
      ("virtio-balloon" with "-ccw", "-pci", or "-device" appended), so the
      code is fairly simple. It has been implemented such that it will be
      easier to add handling for other -device entries that aren't otherwise
      recognized - just add another "else if (STRPREFIX(opts, ....)" clause.
      
      qemuParseCommandLineString() previously would always add a <memballoon
      model='virtio'/> to every result (the comments erroneously say that it
      is adding a <memballoon model='none'/>) This has been changed to add
      model='none', and 84 test case xml's updated accordingly (so that
      qemuxml2argvtest won't fail).
      
      Now that the memballoon device is properly parsed, we can safely add a
      test for properly ignoring -nodefconfig and -nodefaults. Rather than
      adding an entire new test case for this (and memballoon), we just
      randomly pick the clock-utc test and modify it slightly to fulfill the
      purpose.
      ef016226
    • J
      Report correct error in virNetDevTapCreate · f8a33815
      Ján Tomko 提交于
      ioctl returns -1, not the errno value
      f8a33815
    • J
      Do not call closedir with NULL argument · 10af0a19
      Ján Tomko 提交于
      Only three other callers possibly call closedir on a NULL argument.
      Even though these probably won't be used on FreeBSD where this crashes,
      let's be nice and only call closedir on an actual directory stream.
      10af0a19
    • J
      Fix invalid write in virNumaGetDistances · 9a2e523e
      Ján Tomko 提交于
      ==== Invalid write of size 4
      ====    at 0x52E678C: virNumaGetDistances (virnuma.c:479)
      ====    by 0x5396890: nodeCapsInitNUMA (nodeinfo.c:1796)
      ====    by 0x203C2B: virQEMUCapsInit (qemu_capabilities.c:960)
      ====  Address 0xe10a1e0 is 0 bytes after a block of size 0 alloc'd
      ====    at 0x4C2A6D0: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ====    by 0x52A10D6: virAllocN (viralloc.c:191)
      ====    by 0x52E674D: virNumaGetDistances (virnuma.c:470)
      ====    by 0x5396890: nodeCapsInitNUMA (nodeinfo.c:1796)
      ====    by 0x203C2B: virQEMUCapsInit (qemu_capabilities.c:960)
      9a2e523e
    • P
      util: numa: Stub out hugepage code on non-Linux platforms · e6258a33
      Peter Krempa 提交于
      The hugepage sizing and counting code gathers the information from sysfs
      and thus isn't portable. Stub it out for non-Linux so that we can report
      a better error. This patch also avoids calling sysinfo() on Mingw where
      it isn't supported.
      e6258a33
    • P
      util: numa: Catch readdir errors in virNumaGetPages · 00b2317a
      Peter Krempa 提交于
      Don't return possibly incomplete result if virDirRead fails.
      00b2317a
    • P
      tests: Fix syntax-check after cdd11151 · 42d75b44
      Peter Krempa 提交于
      makefile_conditionals
      tests/Makefile.am:293:endif
      maint.mk: match "if FOO" with "endif FOO" in Makefiles
      make: *** [sc_makefile_conditionals] Error 1
      42d75b44
    • P
      test: Disable storage test when FS backend isn't compiled in · cdd11151
      Peter Krempa 提交于
      'virstoragetest' accesses backing chains of files on local storage with
      the help of the storage driver. Disable the test on builds without the
      storage driver as the test is crashing otherwise.
      
      Reported by: Roman Bogorodskiy
      cdd11151
    • J
      Properly check the return value of CCWAddressAsString · 3fe9d75a
      Ján Tomko 提交于
      It returns NULL on failure. Checking if the negation of it
      is less than zero makes no sense. (Found by coverity after moving
      the code)
      
      In another case, the return value wasn't checked at all.
      3fe9d75a
  3. 21 6月, 2014 2 次提交
  4. 20 6月, 2014 17 次提交
  5. 19 6月, 2014 6 次提交