1. 24 9月, 2018 1 次提交
  2. 01 9月, 2018 1 次提交
  3. 10 5月, 2018 1 次提交
  4. 24 1月, 2018 1 次提交
  5. 12 1月, 2018 1 次提交
  6. 04 11月, 2017 1 次提交
  7. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  8. 12 4月, 2017 3 次提交
  9. 25 11月, 2016 1 次提交
    • M
      virstring: Unify string list function names · c2a5a4e7
      Michal Privoznik 提交于
      We have couple of functions that operate over NULL terminated
      lits of strings. However, our naming sucks:
      
      virStringJoin
      virStringFreeList
      virStringFreeListCount
      virStringArrayHasString
      virStringGetFirstWithPrefix
      
      We can do better:
      
      virStringListJoin
      virStringListFree
      virStringListFreeCount
      virStringListHasString
      virStringListGetFirstWithPrefix
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c2a5a4e7
  10. 14 11月, 2016 1 次提交
  11. 24 8月, 2016 1 次提交
    • P
      virsh: respect -q/--quiet more · b620bdee
      Pino Toscano 提交于
      Turn various vshPrint() informative messages into vshPrintExtra(), so
      they are not printed when requesting the quiet mode; neither XML/info
      outputs nor the results of commands are affected.
      Also change the expected outputs of the virsh-undefine test, since virsh
      is invoked in quiet mode there.
      
      Some informative messages might still be converted (and thus silenced
      when in quiet mode), but this is an improvements nonetheless.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358179
      b620bdee
  12. 12 1月, 2016 3 次提交
    • J
      virsh: Create macro for common "current" option · 5b42dbed
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr which for many options in virsh-domain.c
      is simply "affect current domain". So, create a second macro within that
      file in order to define the more common use as a revector to the
      common macro with the common _helpstr.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5b42dbed
    • J
      virsh: Create macro for common "live" option · 8e4108f0
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr which for many options in virsh-domain.c
      is simply "affect running domain". So, create a second macro within that
      file in order to define the more common use as a revector to the
      common macro with the common _helpstr.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      8e4108f0
    • J
      virsh: Create macro for common "domain" option · b6fb1e24
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr which will be used to pass the translatable
      helpstr since not all domain options can take the same string.
      
      The majority of the options take 'N_("domain name, id or uuid")', so
      create a separate macro with a _FULL suffix while those that do not
      take the same string will use the VIRSH_COMMON_OPT_DOMAIN macro.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b6fb1e24
  13. 14 8月, 2015 1 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
  14. 02 6月, 2015 1 次提交
    • A
      virsh: Pass vshControl to all vshCommandOpt*() calls · be6ff4da
      Andrea Bolognani 提交于
      This will allow us to use vshError() to report errors from inside
      vshCommandOpt*(), instead of replicating the same logic and error
      messages all over the place.
      
      We also have more context inside the vshCommandOpt*() functions,
      for example the actual value used on the command line, which means
      we can produce more detailed error messages.
      
      vshCommandOptBool() is the exception here, because it's explicitly
      designed not to report any error.
      be6ff4da
  15. 02 4月, 2015 1 次提交
  16. 12 1月, 2015 1 次提交
  17. 15 11月, 2014 1 次提交
  18. 11 9月, 2014 1 次提交
    • 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
  19. 25 3月, 2014 1 次提交
  20. 14 3月, 2014 1 次提交
  21. 20 8月, 2013 1 次提交
    • P
      virsh: modify vshStringToArray to duplicate the elements too · d64af6ce
      Peter Krempa 提交于
      At a slightly larger memory expense allow stealing of items from the
      string array returned from vshStringToArray and turn the result into a
      string list compatible with virStringSplit. This will allow to use the
      common dealloc function.
      
      This patch also fixes a few forgotten checks of return from
      vshStringToArray and one memory leak.
      d64af6ce
  22. 26 7月, 2013 1 次提交
    • J
      Fix virsh snapshot-list error reporting · e3b21cdc
      Jim Fehlig 提交于
      Noticed that the expected "not supported" error is dropped when
      invoking 'virsh snapshot-list dom' on a Xen installation running
      the libxl driver
      
       virsh snapshot-list test
       error: Invalid snapshot: virDomainSnapshotFree
      
      The error is overwritten by a call to virDomainSnapshotFree
      in cleanup code within cmdSnapshotList.  Prevent overwritting
      the real error by not calling virDomainSnapshotFree with a NULL
      virDomainSnapshotPtr.
      e3b21cdc
  23. 11 7月, 2013 1 次提交
  24. 11 5月, 2013 1 次提交
    • L
      util: move virFile* functions from virutil.c to virfile.c · bfe7721d
      Laine Stump 提交于
      These all existed before virfile.c was created, and for some reason
      weren't moved.
      
      This is mostly straightfoward, although the syntax rule prohibiting
      write() had to be changed to have an exception for virfile.c instead
      of virutil.c.
      
      This movement pointed out that there is a function called
      virBuildPath(), and another almost identical function called
      virFileBuildPath(). They really should be a single function, which
      I'll take care of as soon as I figure out what the arglist should look
      like.
      bfe7721d
  25. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  26. 21 3月, 2013 4 次提交
  27. 15 3月, 2013 2 次提交
    • M
      Cleanup useless flags specifications · 73cc87d1
      Martin Kletzander 提交于
      After we switched to C99 initialization, I noticed there were many
      places where the specification of .flags parameter differed.  After
      going through many options and deciding whether to unify the
      initialization to be '.flags = 0' or '.flags = VSH_OFLAG_NONE', I
      realized both can be removed and it makes the code easier to go
      through.
      73cc87d1
    • M
      Fix snapshot-create-as syntax in help output · 66f1bbc3
      Martin Kletzander 提交于
      According to the man page, the memspec parameter should have the
      '--memspec' option mandatory and this is as close as we can get to
      that.  What this change does is explained below.
      
      man virsh:
      
      snapshot-create-as ... [[--live] [--memspec memspec]]
      
      virsh help snapshot-create-as before this patch:
      
        SYNOPSIS
          snapshot-create-as ... [<memspec>] ...
      ...
        OPTIONS
          [--memspec] <string> ...
      
      virsh help snapshot-create-as after this patch:
      
        SYNOPSIS
          snapshot-create-as ... [--memspec <string>] ...
      ...
        OPTIONS
          --memspec <string> ...
      66f1bbc3
  28. 11 3月, 2013 1 次提交
  29. 05 3月, 2013 1 次提交
  30. 13 2月, 2013 2 次提交
  31. 11 2月, 2013 1 次提交