1. 15 11月, 2014 2 次提交
  2. 13 11月, 2014 3 次提交
  3. 11 11月, 2014 2 次提交
  4. 06 11月, 2014 2 次提交
  5. 03 11月, 2014 1 次提交
    • M
      virsh: don't list unknown domains · 1eb53f05
      Martin Kletzander 提交于
      When the list of domains is fetched and being printed, but in the
      meantime one domain was undefined before its status was fetched, the
      output then includes domain with "no state".  With this patch, such
      domain is skipped over as consecutive 'virsh list --all' (or the same
      one ran a second later) wouldn't list it anyway.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      1eb53f05
  6. 30 10月, 2014 1 次提交
    • L
      virsh: Fix memory leak in cmdNetworkDHCPLeases · 089663ae
      Luyao Huang 提交于
      After cidr_format is allocated by virAsprintf and used by vshPrintExtra
      it needs to be freed.
      
      Fix the following memory leak from valgrind:
       18 bytes in 1 blocks are definitely lost in loss record 41 of 192
          at 0x4C29BBD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
          by 0x85CE36F: __vasprintf_chk (vasprintf_chk.c:80)
          by 0x4EE52D5: UnknownInlinedFun (stdio2.h:210)
          by 0x4EE52D5: virVasprintfInternal (virstring.c:459)
          by 0x4EE53CA: virAsprintfInternal (virstring.c:480)
          by 0x14FE96: cmdNetworkDHCPLeases (virsh-network.c:1378)
          by 0x13006B: vshCommandRun (virsh.c:1915)
          by 0x12A9E1: main (virsh.c:3699)
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      089663ae
  7. 29 10月, 2014 3 次提交
  8. 14 10月, 2014 2 次提交
  9. 02 10月, 2014 1 次提交
  10. 01 10月, 2014 1 次提交
  11. 29 9月, 2014 1 次提交
  12. 25 9月, 2014 1 次提交
  13. 24 9月, 2014 2 次提交
  14. 23 9月, 2014 3 次提交
  15. 18 9月, 2014 5 次提交
  16. 16 9月, 2014 1 次提交
    • J
      virsh: Add iothread to 'attach-disk' · bc5a8090
      John Ferlan 提交于
      Add an iothread parameter to allow attaching to an IOThread, such as:
      
      virsh attach-disk $dom $source $target --live --config --iothread 2 \
           --targetbus virtio --driver qemu --subdriver raw  --type disk
      bc5a8090
  17. 15 9月, 2014 2 次提交
    • J
      Resolve Coverity CHECKED_RETURN · 07334ccb
      John Ferlan 提交于
      Coverity complained that checking the return of virDomainCreate()
      was not consistent amongst the callers - so added the return check
      to the objecteventtest.c and adjust the virt-login-shell to compare
      < 0 rather than just non zero for the failure condition.
      07334ccb
    • J
      virsh: Resolve Coverity DEADCODE · 0268a35d
      John Ferlan 提交于
      Coverity complains that on the first pass through the for loop that
      'params' cannot be true, thus the ternary setting to "&" cannot be
      done. Since we can only ever get to this point once, drop the ternary
      0268a35d
  18. 12 9月, 2014 3 次提交
    • M
      virDomainUndefineFlags: Allow NVRAM unlinking · 273b6581
      Michal Privoznik 提交于
      When a domain is undefined, there are options to remove it's
      managed save state or snapshots. However, there's another file
      that libvirt creates per domain: the NVRAM variable store file.
      Make sure that the file is not left behind if the domain is
      undefined.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      273b6581
    • J
      virsh: Resolve Coverity NEGATIVE_RETURNS · be365d8d
      John Ferlan 提交于
      Coverity notes that after we VIR_ALLOC_N(params, nparams) a failed call to
      virDomainGetCPUStats could result in nparams being set to -1. In that case,
      the subsequent virTypedParamsFree in cleanup will pass -1 which isn't good.
      
      Use the returned value as the number of stats to display in the loop as
      it will be the value reported from the hypervisor and may be less than
      nparams which is OK
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      be365d8d
    • J
      virsh: Move --completed from resume to domjobinfo · 58252332
      Jiri Denemark 提交于
      Because of similar contexts, git rebase I did just before pushing the
      series which added --completed option patched the wrong command.
      58252332
  19. 11 9月, 2014 3 次提交
    • J
      virsh: Resolve Coverity DEADCODE · 60b029c7
      John Ferlan 提交于
      Coverity points out that if 'dom' isn't returned from virDomainQemuAttach,
      then the code already jumps to cleanup, so there was no need for the
      subsequent if (dom != NULL) check.
      
      I moved the error message about failure into the goto cleanup on failure
      and then removed the if (dom != NULL)
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      60b029c7
    • J
      virsh: Resolve Coverity DEADCODE · b46b7785
      John Ferlan 提交于
      Coverity points out that by using EMPTYSTR(type) we are guarding against
      the possibility that it could be NULL; however, based on how 'type' was
      initialized to NULL, then using nested ternary if-then-else's (?:?:)
      setting either "ipv4", "ipv6", or "" - there is no way it could be NULL.
      Since "-" is supposed to mean something empty in a field - modify the
      nested ternary to an easier to read/process if-then-else leaving the
      initialization to NULL to mean "-" in the formatted output.
      
      Also changed the name from 'type' to 'typestr'.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b46b7785
    • J
      virsh: Resolve Coverity DEADCODE · daf27d4d
      John Ferlan 提交于
      Since 0766783a
      
      Coverity complains that the EDIT_FREE definition results in DEADCODE.
      
      As it turns out with the change to use the EDIT_FREE macro the call to
      vir*Free() wouldn't be necessary nor would it happen...
      
      Prior code to above commitid would :
      
        vir*Ptr foo = NULL;
        ...
        foo = vir*GetXMLDesc()
        ...
        vir*Free(foo);
        foo = vir*DefineXML()
        ...
      
      And thus the free was needed.  With the change to use EDIT_FREE the
      same code changed to:
      
        vir*Ptr foo = NULL;
        vir*Ptr foo_edited = NULL;
        ...
        foo = vir*GetXMLDesc()
        ...
        if (foo_edited)
            vir*Free(foo_edited);
        foo_edited = vir*DefineXML()
        ...
      
      However, foo_edited could never be set in the code path - even with
      all the goto's since the only way for it to be set is if vir*DefineXML()
      succeeds in which case the code to allow a retry (and thus all the goto's)
      never leaves foo_edited set
      
      All error paths lead to "cleanup:" which causes both foo and foo_edited
      to call the respective vir*Free() routines if set.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      daf27d4d
  20. 10 9月, 2014 1 次提交