1. 21 10月, 2019 3 次提交
  2. 18 10月, 2019 1 次提交
  3. 16 10月, 2019 1 次提交
  4. 15 10月, 2019 2 次提交
  5. 14 10月, 2019 1 次提交
    • D
      build: link to glib library · cfbe9f12
      Daniel P. Berrangé 提交于
      Add the main glib.h to internal.h so that all common code can use it.
      
      Historically glib allowed applications to register an alternative
      memory allocator, so mixing g_malloc/g_free with malloc/free was not
      safe.
      
      This was feature was dropped in 2.46.0 with:
      
            commit 3be6ed60aa58095691bd697344765e715a327fc1
            Author: Alexander Larsson <alexl@redhat.com>
            Date:   Sat Jun 27 18:38:42 2015 +0200
      
              Deprecate and drop support for memory vtables
      
      Applications are still encourged to match g_malloc/g_free, but it is no
      longer a mandatory requirement for correctness, just stylistic. This is
      explicitly clarified in
      
          commit 1f24b36607bf708f037396014b2cdbc08d67b275
          Author: Daniel P. Berrangé <berrange@redhat.com>
          Date:   Thu Sep 5 14:37:54 2019 +0100
      
              gmem: clarify that g_malloc always uses the system allocator
      
      Applications can still use custom allocators in general, but they must
      do this by linking to a library that replaces the core malloc/free
      implemenentation entirely, instead of via a glib specific call.
      
      This means that libvirt does not need to be concerned about use of
      g_malloc/g_free causing an ABI change in the public libary, and can
      avoid memory copying when talking to external libraries.
      
      This patch probes for glib, which provides the foundation layer with
      a collection of data structures, helper APIs, and platform portability
      logic.
      
      Later patches will introduce linkage to gobject which provides the
      object type system, built on glib, and gio which providing objects
      for various interesting tasks, most notably including DBus client
      and server support and portable sockets APIs, but much more too.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      cfbe9f12
  6. 27 9月, 2019 1 次提交
  7. 24 9月, 2019 1 次提交
  8. 27 8月, 2019 1 次提交
  9. 09 8月, 2019 2 次提交
  10. 15 7月, 2019 1 次提交
  11. 11 7月, 2019 2 次提交
  12. 16 5月, 2019 1 次提交
  13. 15 5月, 2019 1 次提交
  14. 12 4月, 2019 1 次提交
  15. 05 4月, 2019 3 次提交
  16. 22 3月, 2019 1 次提交
  17. 18 3月, 2019 2 次提交
  18. 21 2月, 2019 2 次提交
  19. 14 2月, 2019 1 次提交
  20. 04 2月, 2019 1 次提交
  21. 14 12月, 2018 3 次提交
    • 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
      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
  22. 12 11月, 2018 1 次提交
    • E
      conf: Add new module node_device_util · f1e8d2f0
      Erik Skultety 提交于
      There's a lot of stuff going on in src/conf/nodedev_conf which is
      sometimes not directly related to config and we're not really consistent
      with putting only parser/formatter related stuff here, e.g. like we do
      for domains. So, let's start simply by adding a new module
      node_device_util containing some of the helpers. Unfortunately, even
      though these helpers tend to open a secondary driver connection and would
      be much therefore better suited as a nodedev driver module, we can't do
      that without pulling headers from the driver into conf/ and that's wrong
      because we want conf/ to stay driver-agnostic.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Acked-by: NMichal Privoznik <mprivozn@redhat.com>
      f1e8d2f0
  23. 05 11月, 2018 1 次提交
    • J
      nodedev: Document the udevEventHandleThread · 29183778
      John Ferlan 提交于
      Commit cdbe1332 neglected to document the API. So let's add some
      details about the algorithm and why it was used to help future
      readers understand the issues encountered.
      
      NB: Management of the processing udev device notification is a
      delicate balance between the udev process, the scheduler, and when
      exactly the data from/for the socket is received. The balance is
      particularly important for environments when multiple devices are
      added into the system more or less simultaneously such as is done
      for mdev or SRIOV. In these cases old libudev blocking on the udev
      recv() occurs more frequently. It's expected that future devices
      will follow similar algorithms. Even though the algorithm does
      present some challenges for older OS's (such as Centos 6), trying
      to rewrite the algorithm to fit both models would be more complex
      and involve pulling the monitor object out of the private data
      lockable object and would need to be guarded by a separate lock.
      Devising such an algorithm to work around issues with older OS's
      at the expense of more modern OS algorithms in newer event processing
      code may result in unexpected issues, so the choice is to encourage
      use of newer OS's with newer udev event processing code.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      29183778
  24. 20 9月, 2018 2 次提交
  25. 12 6月, 2018 1 次提交
  26. 18 4月, 2018 2 次提交
  27. 12 4月, 2018 1 次提交