1. 18 1月, 2019 1 次提交
  2. 14 12月, 2018 4 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Fix many mistakes & inconsistencies in header file layout · 4cfd7090
      Daniel P. Berrangé 提交于
      This introduces a syntax-check script that validates header files use a
      common layout:
      
        /*
         ...copyright header...
         */
        <one blank line>
        #ifndef SYMBOL
        # define SYMBOL
        ....content....
        #endif /* SYMBOL */
      
      For any file ending priv.h, before the #ifndef, we will require a
      guard to prevent bogus imports:
      
        #ifndef SYMBOL_ALLOW
        # error ....
        #endif /* SYMBOL_ALLOW */
        <one blank line>
      
      The many mistakes this script identifies are then fixed.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      4cfd7090
    • D
      remote: check & report OOM in make_nonnull_XXX methods · dc54b3ec
      Daniel P. Berrangé 提交于
      The make_nonnull_XXX methods can all fail due to OOM but this was being
      silently ignored and thus also not checked by callers. Make the methods
      propagate errors and use ATTRIBUTE_RETURN_CHECK to force callers to deal
      with it.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      dc54b3ec
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  3. 15 11月, 2018 3 次提交
  4. 05 11月, 2018 1 次提交
    • J
      access: Modify the VIR_ERR_ACCESS_DENIED to include driverName · ccc72d5c
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1631606
      
      Changes made to manage and utilize a secondary connection
      driver to APIs outside the scope of the primary connection
      driver have resulted in some confusion processing polkit rules
      since the simple "access denied" error message doesn't provide
      enough of a clue when combined with the "authentication failed:
      access denied by policy" as to which connection driver refused
      or failed the ACL check.
      
      In order to provide some context, let's modify the existing
      "access denied" error returne from the various vir*EnsureACL
      API's to provide the connection driver name that is causing
      the failure. This should provide the context for writing the
      polkit rules that would allow access via the driver.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      ccc72d5c
  5. 31 10月, 2018 1 次提交
  6. 12 10月, 2018 1 次提交
  7. 20 9月, 2018 2 次提交
  8. 16 8月, 2018 1 次提交
  9. 15 8月, 2018 1 次提交
    • M
      rpc: Initialize a worker pool for max_workers=0 as well · 7330d091
      Marc Hartmayer 提交于
      Semantically, there is no difference between an uninitialized worker
      pool and an initialized worker pool with zero workers. Let's allow the
      worker pool to be initialized for max_workers=0 as well then which
      makes the API more symmetric and simplifies code. Validity of the
      worker pool is delegated to virThreadPoolGetMaxWorkers instead.
      
      This patch fixes segmentation faults in
      virNetServerGetThreadPoolParameters and
      virNetServerSetThreadPoolParameters for the case when no worker pool
      is actually initialized (max_workers=0).
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
      7330d091
  10. 25 7月, 2018 2 次提交
  11. 23 7月, 2018 1 次提交
    • A
      src: Make virStr*cpy*() functions return an int · 6c0d0210
      Andrea Bolognani 提交于
      Currently, the functions return a pointer to the
      destination buffer on success or NULL on failure.
      
      Not only does this kind of error handling look quite
      alien in the context of libvirt, where most functions
      return zero on success and a negative int on failure,
      but it's also somewhat pointless because unless there's
      been a failure the returned pointer will be the same
      one passed in by the user, thus offering no additional
      value.
      
      Change the functions so that they return an int
      instead.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      6c0d0210
  12. 21 7月, 2018 2 次提交
  13. 26 6月, 2018 2 次提交
  14. 06 6月, 2018 1 次提交
  15. 05 6月, 2018 2 次提交
  16. 16 5月, 2018 1 次提交
  17. 11 5月, 2018 2 次提交
  18. 04 5月, 2018 1 次提交
  19. 18 4月, 2018 2 次提交
  20. 17 4月, 2018 1 次提交
  21. 09 4月, 2018 7 次提交
  22. 06 4月, 2018 1 次提交
    • J
      util: introduce virSocketAddrParseAny · 412afdb8
      Jim Fehlig 提交于
      When preparing for migration, the libxl driver creates a new TCP listen
      socket for the incoming migration by calling virNetSocketNewListenTCP,
      passing the destination host name. virNetSocketNewListenTCP calls
      virSocketAddrParse to check if the host name is a wildcard address, in
      which case it avoids adding the AI_ADDRCONFIG flag to the hints passed to
      getaddrinfo. If the host name is not an IP address, virSocketAddrParse
      reports an error
      
      error : virSocketAddrParseInternal:121 : Cannot parse socket address
      'myhost.example.com': Name or service not known
      
      But virNetSocketNewListenTCP succeeds regardless and the overall migration
      operation succeeds.
      
      Introduce virSocketAddrParseAny and use it when simply testing if a host
      name/addr is parsable.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      412afdb8