1. 01 12月, 2016 2 次提交
    • L
      util: new function virPCIDeviceGetConfigPath() · bfdc1451
      Laine Stump 提交于
      The path to the config file for a PCI device is conventiently stored
      in a virPCIDevice object, but that object's contents aren't directly
      visible outside of virpci.c, so we need to have an accessor function
      for it if anyone needs to look at it.
      bfdc1451
    • L
      util: new function virFileLength() · e026563f
      Laine Stump 提交于
      This new function just calls fstat() (if provided with a valid fd) or
      stat() (if fd is -1) and returns st_size (or -1 if there is an
      error). We may decide we want this function to be more complex, and
      handle things like block devices - this is a placeholder (that works)
      for any more complicated function.
      e026563f
  2. 25 11月, 2016 2 次提交
    • 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
    • E
      util: Management routines for scsi_host devices · 629544be
      Eric Farman 提交于
      For a new hostdev type='scsi_host' we have a number of
      required functions for managing, adding, and removing the
      host device to/from guests.  Provide the basic infrastructure
      for these tasks.
      
      The name "SCSIVHost" (and its variants) is chosen to avoid
      conflicts with existing code named "SCSIHost" to refer to
      a hostdev type='scsi' protcol='none'.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      629544be
  3. 22 11月, 2016 1 次提交
  4. 15 11月, 2016 5 次提交
  5. 09 11月, 2016 1 次提交
  6. 02 11月, 2016 1 次提交
  7. 27 10月, 2016 3 次提交
  8. 25 10月, 2016 2 次提交
    • L
      conf: make virDomainPCIAddressGetNextSlot() a local static function · 696929e6
      Laine Stump 提交于
      This function is no longer needed outside of domain_addr.c.
      696929e6
    • L
      conf: new function virDomainPCIAddressReserveNextAddr() · 848e7ff2
      Laine Stump 提交于
      There is an existing virDomainPCIAddressReserveNextSlot() which will
      reserve all functions of the next available PCI slot. One place in the
      qemu PCI address assignment code requires reserving a *single*
      function of the next available PCI slot. This patch modifies and
      renames virDomainPCIAddressReserveNextSlot() so that it can fulfill
      both the original purpose and the need to reserve a single function.
      
      (This is being done so that the abovementioned code in qemu can have
      its "kind of open coded" solution replaced with a call to this new
      function).
      848e7ff2
  9. 20 10月, 2016 1 次提交
  10. 12 10月, 2016 1 次提交
  11. 11 10月, 2016 1 次提交
  12. 10 10月, 2016 13 次提交
    • E
      virlog: Remove functions that aren't used anywhere anymore · adda3e4f
      Erik Skultety 提交于
      This is mainly virLogAddOutputTo* which were replaced by virLogNewOutputTo* and
      the previously poorly named ones virLogParseAndDefine* functions. All of these
      are unnecessary now, since all the original callers were transparently switched
      to the new model of separate parsing and defining logic.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      adda3e4f
    • E
      virlog: Introduce virLogSetFilters · c33babfe
      Erik Skultety 提交于
      This method will eventually replace virLogParseAndDefineFilters which
      currently does both parsing and defining.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      c33babfe
    • E
      virlog: Introduce virLogSetOutputs · 6db7b8cb
      Erik Skultety 提交于
      This API is the entry point to output modification of the logger. Currently,
      everything is done by virLogParseAndDefineOutputs. Parsing and defining will be
      split into two operations both handled by this method transparently.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      6db7b8cb
    • E
      virlog: Introduce virLogParseFilters · 09d7ced8
      Erik Skultety 提交于
      Abstraction added over parsing a single filter. The method parses potentially a
      set of logging filters, while adding each filter logging object to a
      caller-provided array.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      09d7ced8
    • E
      virlog: Introduce virLogParseOutputs · 4b266c18
      Erik Skultety 提交于
      Another abstraction added on the top of parsing a single logging output. This
      method takes and parses the whole set of outputs, adding each single output
      that has already been parsed into a caller-provided array. If the user-supplied
      string contained duplicate outputs, only the last occurrence is taken into
      account (all the others are removed from the list), so we silently avoid
      duplicate logs.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      4b266c18
    • E
      virlog: Introduce virLogParseFilter · 77a45f2f
      Erik Skultety 提交于
      Same as for outputs, introduce a new method, that is basically the same as
      virLogParseAndDefineFilter with the difference that it does not define the
      filter. It rather returns a newly created object that needs to be inserted into
      a list and then defined separately.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      77a45f2f
    • E
      virlog: Introduce virLogParseOutput · 09b7cbb1
      Erik Skultety 提交于
      Introduce a method to parse an individual logging output. The difference
      compared to the virLogParseAndDefineOutput is that this method does not define
      the output, instead it makes use of the virLogNewOutputTo* methods introduced
      in the previous patch and just returns the virLogOutput object that has to be
      added to a list of object which then can be defined as a whole via
      virLogDefineOutputs. The idea remains still the same - split parsing and
      defining of the logging primitives (outputs, filters).
      Additionally, since virLogNewOutputTo* methods are now finally used,
      ATTRIBUTE_UNUSED can be successfully removed from the methods' definitions,
      since that was just to avoid compiler complaints about unused static functions.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      09b7cbb1
    • E
      virlog: Introduce virLogDefineFilters · 58ab1b6f
      Erik Skultety 提交于
      Prepare a method that only defines a set of filters. It takes a list of
      filters, preferably created by virLogParseFilters. The original set of filters
      is reset and replaced by the new user-provided set of filters.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      58ab1b6f
    • E
      virlog: Introduce virLogDefineOutputs · d9d6b61f
      Erik Skultety 提交于
      Prepare a method that only defines a set of outputs. It takes a list of
      outputs, preferably created by virLogParseOutputs. The original set of outputs
      is reset and replaced by the new user-provided set of outputs.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      d9d6b61f
    • E
      virlog: Introduce virLogFindOutput · b5004b09
      Erik Skultety 提交于
      Outputs are a bit trickier than filters, since the user(config)-specified
      set of outputs can contain duplicates. That would lead to logging the same
      message twice. For compatibility reasons, we cannot just error out and forbid
      the daemon to start if we find duplicate outputs which do not make sense.
      Instead, we could silently take into account only the last occurrence of the
      duplicate output and remove all the previous ones, so that the logger will not
      try to use them when it is looping over all of its registered outputs.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b5004b09
    • E
      virlog: Introduce virLogFilterNew · 435200ca
      Erik Skultety 提交于
      This method allocates a new filter object which it then returns back to caller.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      435200ca
    • E
      virlog: Introduce virLogOutputNew · b0f5dc91
      Erik Skultety 提交于
      In order to later split output parsing and output defining, introduce a new
      function which will create a new virLogOutput object which the parser will
      insert into a list with the list being eventually defined.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b0f5dc91
    • E
      virlog: Rename virLogParse* to virLogParseAndDefine* · b8c370a9
      Erik Skultety 提交于
      Right now virLogParse* functions are doing both parsing and defining of filters
      and outputs which should be two separate operations. Since the naming is
      apparently a bit poor this patch renames these functions to
      virLogParseAndDefine* which eventually will be replaced by virLogSet*.
      Additionally, virLogParse{Filter,Output} will be later (after the split) reused,
      so that these functions do exactly what the their name suggests.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b8c370a9
  13. 07 10月, 2016 1 次提交
  14. 05 10月, 2016 1 次提交
    • J
      util: Introduce virJSONValueObjectStealArray · ebf8b783
      John Ferlan 提交于
      Provide the Steal API for any code paths that will desire to grab the
      object array and then free it afterwards rather than relying to freeing
      the whole chain from the reply.
      ebf8b783
  15. 30 9月, 2016 1 次提交
  16. 22 9月, 2016 4 次提交