1. 01 3月, 2016 12 次提交
  2. 27 2月, 2016 1 次提交
  3. 26 2月, 2016 15 次提交
  4. 25 2月, 2016 5 次提交
    • J
      util: Avoid calling closedir(NULL) · 04e10925
      Jiri Denemark 提交于
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      04e10925
    • M
      vircgroupmock: Mock access("/sys/devices/system/cpu/present") · 50129dcc
      Michal Privoznik 提交于
      There's been a report on the upstream list [1] describing we
      access /sys/devices/system/cpu/present directly on the host from
      within our test suite. This may end up in unpredictable results
      as no all linux systems are required to have that file. Mock
      access to the file.
      
      libvirt.git/tests $ ../run strace vircgrouptest
      ...
      access("/sys/devices/system/cpu/present", F_OK) = 0
      ...
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      50129dcc
    • O
      Fix bug of attaching redirdev device · c92547c3
      Osier Yang 提交于
      RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298070
      
      The corresponding chardev must be attached first, otherwise the
      the qemu command line won't be complete (missing the host part),
      c92547c3
    • E
      build: accomodate selinux 2.5 header API change · 5ea3a690
      Eric Blake 提交于
      Yet again, selinux has been adding const-correctness; this change
      is ABI-compatible, but breaks API, which affects us when we try to
      override things in our testsuite:
      
      ../../tests/securityselinuxhelper.c:307:24: error: conflicting types for 'selabel_open'
       struct selabel_handle *selabel_open(unsigned int backend,
                              ^~~~~~~~~~~~
      In file included from ../../tests/securityselinuxhelper.c:32:0:
      /usr/include/selinux/label.h:73:24: note: previous declaration of 'selabel_open' was here
      
      The problem is a new 'const' prior to the second parameter.
      
      Fix it the same way we did in commit 292d3f2d: check for the new
      const at configure time.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5ea3a690
    • J
      libxl: implement virDomainInterfaceStats · 77fdd82e
      Joao Martins 提交于
      Introduce support for domainInterfaceStats API call for querying
      network interface statistics. Consequently it also enables the use of
      `virsh domifstat <dom> <interface name>` command plus seeing the
      interfaces names instead of "-" when doing `virsh domiflist <dom>`.
      
      After successful guest creation we fill the network interfaces names
      based on domain, device id and append suffix if it's emulated in the
      following form: vif<domid>.<devid>[-emu].  We extract the network
      interfaces info from the libxl_domain_config object in
      libxlDomainCreateIfaceNames() to generate ifname. On domain cleanup we
      also clear ifname, in case it was set by libvirt (i.e. being prefixed
      with "vif"). We also skip these two steps in case the name of the
      interface was manually inserted by the administrator. Since the
      introduction of netprefix (commit a040ba9e), ifnames with a registered
      prefix will be freed on virDomain{Obj,Def}Format*, thus eliminating
      the migration issues observed with the reverted commit d2e5538b whereas
      source and destination would have the same ifname.
      
      For getting the interface statistics we resort to virNetInterfaceStats
      and let libvirt handle the platform specific nits. Note that the
      latter is not yet supported in FreeBSD.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      77fdd82e
  5. 24 2月, 2016 3 次提交
    • C
      libxl: small fix in parsing network · 5c79c445
      Chunyan Liu 提交于
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      5c79c445
    • E
      rbd: fix 32-bit build · 5a5c2837
      Eric Blake 提交于
      %zu is not always synonymous with uint64_t; on 32-bit machines,
      size_t is only 32 bits.  Prefer "%lld"/'unsigned long long' when
      the variable is under our control, and "%"PRIu64 when we are
      stuck with 'uint64_t' from RBD.
      
      Fixes errors such as:
      
      ../../src/storage/storage_backend_rbd.c: In function 'virStorageBackendRBDVolWipe':
      ../../src/storage/storage_backend_rbd.c:1281:15: error: format '%zu' expects argument of type 'size_t', but argument 8 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
           VIR_DEBUG("Need to wipe %zu bytes from RBD image %s/%s",
                     ^
      ../../src/util/virlog.h:90:73: note: in definition of macro 'VIR_DEBUG_INT'
           virLogMessage(src, VIR_LOG_DEBUG, filename, linenr, funcname, NULL, __VA_ARGS__)
                                                                               ^
      ../../src/storage/storage_backend_rbd.c:1281:5: note: in expansion of macro 'VIR_DEBUG'
           VIR_DEBUG("Need to wipe %zu bytes from RBD image %s/%s",
           ^
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5a5c2837
    • J
      libxl: fix bogus indentation from commit fb2bd208 · c23bbfad
      Jim Fehlig 提交于
      c23bbfad
  6. 23 2月, 2016 4 次提交
    • M
      qemuBuildCommandLine: Change the condition for -nographics · 01c31852
      Michal Privoznik 提交于
      There's this check when building command line that whenever
      domain has no graphics card configured we put -nographics onto
      qemu command line. The check is 'if (!def->graphics)'. This
      makes coverity think that def->graphics can be NULL, which is
      true. But later in the code every access to def->graphics is
      guarded by check for def->ngraphics, so no crash occurs. But this
      is something that coverity fails to deduct.
      In order to shut coverity up lets change the condition to
      'if (!def->ngraphics)'.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      01c31852
    • M
      xen: Check return value of virStringReplace · e0392f5a
      Michal Privoznik 提交于
      After 6604a3dd in which new helper function has been
      introduced, the code calls virStringReplace and dereference the
      result immediately. The string function can, however, return NULL
      so this would SIGSEGV right away. Check for the return value of
      the string function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e0392f5a
    • M
      vbox: Avoid signed and unsigned comparison · a0e5faaf
      Michal Privoznik 提交于
      After 457ff97f there are two defects in our code. In both of
      them we use a signed variable to hold up a number of snapshots
      that domain has. We use a helper function to count the number.
      However, the helper function may fail in which case it returns
      a negative one and control jumps to cleanup label where an
      unsigned variable is used to iterate over array of snapshots. The
      loop condition thus compare signed and unsigned variables which
      in this specific case ends up badly for us.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a0e5faaf
    • M
      docs: Try harder to uninstall · 0f396a41
      Michal Privoznik 提交于
      Imagine you have partially installed libvirt, or maybe you're
      just running 'make uninstall' from a different version than 'make
      install' has been ran. One way or another, we are doing plain
      'rm' instead of 'rm -f' and thus not trying hard enough when
      uninstalling. In the rest of our code we stick with -f switch. Do
      that for docs too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0f396a41