1. 20 7月, 2018 1 次提交
  2. 24 5月, 2018 2 次提交
  3. 12 3月, 2018 2 次提交
  4. 28 2月, 2018 1 次提交
    • J
      virsh: fixing segfault by pool autocompleter function. · 8fe09a53
      Julio Faracco 提交于
      The commands which requires a pool to perform any action for a volume is
      throwing a segfault when you pass the volume name before a pool name or
      without the argument '--pool'.
      
      An example that works:
      virsh # vol-list loops-pool
       Name                 Path
      -------------------------------------------------------------------
       loop0                /mnt/loop0
      
      virsh # vol-info --pool loops-pool lo<TAB>
      
      An example that does not work:
      virsh # vol-list loops-pool
       Name                 Path
      -------------------------------------------------------------------
       loop0                /mnt/loop0
      
      virsh # vol-info lo<TAB>
      Segmentation Fault
      
      The example 'vol-info' can be executed as 'vol-info loop0 --pool
      loops-pool'. So, this commit fixes this problem when the arguments are
      inverted and avoids the segfault.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8fe09a53
  5. 24 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. 27 9月, 2017 1 次提交
  9. 20 9月, 2017 1 次提交
    • J
      storage: Add new events for *PoolBuild() and *PoolDelete(). · b0652192
      Julio Faracco 提交于
      This commit adds new events for two methods and operations: *PoolBuild() and
      *PoolDelete(). Using the event-test and the commands set below we have the
      following outputs:
      
      $ sudo ./event-test
      Registering event callbacks
      myStoragePoolEventCallback EVENT: Storage pool test Defined 0
      myStoragePoolEventCallback EVENT: Storage pool test Created 0
      myStoragePoolEventCallback EVENT: Storage pool test Started 0
      myStoragePoolEventCallback EVENT: Storage pool test Stopped 0
      myStoragePoolEventCallback EVENT: Storage pool test Deleted 0
      myStoragePoolEventCallback EVENT: Storage pool test Undefined 0
      
      Another terminal:
      $ sudo virsh pool-define test.xml
      Pool test defined from test.xml
      
      $ sudo virsh pool-build test
      Pool test built
      
      $ sudo virsh pool-start test
      Pool test started
      
      $ sudo virsh pool-destroy test
      Pool test destroyed
      
      $ sudo virsh pool-delete test
      Pool test deleted
      
      $ sudo virsh pool-undefine test
      Pool test has been undefined
      
      This commits can be a solution for RHBZ #1475227.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1475227Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b0652192
  10. 26 1月, 2017 1 次提交
  11. 18 1月, 2017 3 次提交
  12. 11 1月, 2017 1 次提交
  13. 10 1月, 2017 1 次提交
    • J
      storage: Fix implementation of no-overwrite for file system backend · f23d4bbc
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1363586
      
      Commit id '27758859' introduced the "NO_OVERWRITE" flag check for
      file system backends; however, the implementation, documentation,
      and algorithm was inconsistent. For the "flag" description for the
      API the flag was described as "Do not overwrite existing pool";
      however, within the storage backend code the flag is described
      as "it probes to determine if filesystem already exists on the
      target device, renurning an error if exists".
      
      The code itself was implemented using the paradigm to set up the
      superblock probe by creating a filter that would cause the code
      to only search for the provided format type. If that type wasn't
      found, then the algorithm would return success allowing the caller
      to format the device. If the format type already existed on the
      device, then the code would fail indicating that the a filesystem
      of the same type existed on the device.
      
      The result is that if someone had a file system of one type on the
      device, it was possible to overwrite it if a different format type
      was specified in updated XML effectively trashing whatever was on
      the device already.
      
      This patch alters what NO_OVERWRITE does for a file system backend
      to be more realistic and consistent with what should be expected when
      the caller requests to not overwrite the data on the disk.
      
      Rather than filter results based on the expected format type, the
      code will allow success/failure be determined solely on whether the
      blkid_do_probe calls finds some known format on the device. This
      adjustment also allows removal of the virStoragePoolProbeResult
      enum that was under utilized.
      
      If it does find a formatted file system different errors will be
      generated indicating a file system of a specific type already exists
      or a file system of some other type already exists.
      
      In the original virsh support commit id 'ddcd5674', the description
      for '--no-overwrite' within the 'pool-build' command help output
      has an ambiguous "of this type" included in the short description.
      Compared to the longer description within the "Build a given pool."
      section of the virsh.pod file it's more apparent that the meaning
      of this flag would cause failure if a probe of the target already
      has a filesystem.
      
      So this patch also modifies the short description to just be the
      antecedent of the 'overwrite' flag, which matches the API description.
      This patch also modifies the grammar in virsh.pod for no-overwrite
      as well as reworking the paragraph formats to make it easier to read.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f23d4bbc
  14. 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
  15. 14 11月, 2016 1 次提交
  16. 08 9月, 2016 1 次提交
    • C
      virsh: Fix *-event error string · 18465411
      Christophe Fergeau 提交于
      When using
      virsh net-event non-existing-net
      the error message says that 'either --list or event type is required'
      This is misleading as 'virsh net-event $valid-event-type' is not going
      to work either. What is expected is 'virsh net-event --event
      $valid-event-type'
      
      This commit fixes the string in pool-event, nodedev-event, event, and
      net-event.
      18465411
  17. 24 8月, 2016 2 次提交
    • P
      virsh: use vshError consistently after virBufferError checks · 4362ff43
      Pino Toscano 提交于
      If virBufferError() reports an error, then vshError() is needed to
      report the error situation instead of a simple vshError().
      4362ff43
    • 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
  18. 02 8月, 2016 3 次提交
  19. 25 6月, 2016 1 次提交
  20. 18 6月, 2016 1 次提交
  21. 12 1月, 2016 3 次提交
    • J
      virsh: Create macro for common "file" option · febf69b5
      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 for the less common help string for each
      command option.  Note that only file options using "OT_DATA" and
      "OFLAG_REQ" will be replace - others are left as is.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      febf69b5
    • J
      virsh: Adjustments for the VIRSH_COMMON_OPT_POOL · 70c6e677
      John Ferlan 提交于
      The macro is slightly adjusted to add an argument "_helpstr". This
      will be passed as a translation macro string since other uses of the
      option may not have the same exact help string (such as is the case
      when the uuid is not suppliable for create commands).
      
      In virsh-pool.c - we'll create a singular VIRSH_COMMON_OPT_POOL_FULL
      in order to pass along the 'N_("pool name or uuid")'
      
      In virsh-volume.c there will be a VIRSH_COMMON_OPT_POOL_FULL and a
      VIRSH_COMMON_OPT_POOL_NAME, which passes 'N_("pool name")' for
      the commands that can only pass a name. There will also be a
      VIRSH_COMMON_OPT_POOL_OPTIONAL which is used for the command
      options which use OT_STRING and don't require the --pool argument.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      70c6e677
    • J
      virsh: Convert VSH_POOL_ macro to VIRSH_COMMON_OPT_ · f688b808
      John Ferlan 提交于
      Commit id's 'cf793b00', 'e178688f', 'f9a6110f', '5372d49b', and 'e1937354'
      added new VSH_POOL_ macros; however, it was pointed out after push that
      commit id '834c5720' preferred use of VIRSH_ for the prefix over VSH_.
      
      So this patch just changes the VSH_ to VIRSH_ and it changes the naming
      format from VIRSH_<opt>_OPT_COMMON to VIRSH_COMMON_OPT_<opt>.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f688b808
  22. 18 12月, 2015 5 次提交
  23. 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
  24. 01 6月, 2015 1 次提交
  25. 02 4月, 2015 1 次提交
    • J
      Remove unused includes from virsh · 8995e91b
      Ján Tomko 提交于
      After splitting out most of virsh command, some includes
      are no longer needed.
      
      Some files have the libXML includes despite not needing them.
      8995e91b
  26. 09 3月, 2015 1 次提交
  27. 12 1月, 2015 1 次提交