1. 23 3月, 2017 2 次提交
  2. 12 10月, 2016 1 次提交
  3. 20 6月, 2016 3 次提交
  4. 30 3月, 2016 1 次提交
    • P
      util: bitmap: Introduce self-expanding bitmap APIs · 917426c8
      Peter Krempa 提交于
      In some cases it's impractical to use the regular APIs as the bitmap
      size needs to be pre-declared. These new APIs allow to use bitmaps that
      self expand.
      
      The new code adds a property to the bitmap to track the allocation of
      memory so that VIR_RESIZE_N can be used.
      917426c8
  5. 05 2月, 2016 1 次提交
  6. 03 6月, 2015 1 次提交
  7. 13 3月, 2015 1 次提交
    • J
      Introduce virBitmapIsBitSet · 22fd3ac3
      Ján Tomko 提交于
      A helper that never returns an error and treats bits out of bitmap range
      as false.
      
      Use it everywhere we use ignore_value on virBitmapGetBit, or loop over
      the bitmap size.
      22fd3ac3
  8. 31 1月, 2015 1 次提交
  9. 29 1月, 2015 1 次提交
  10. 04 11月, 2014 1 次提交
  11. 29 7月, 2014 1 次提交
  12. 06 6月, 2014 2 次提交
  13. 06 4月, 2013 1 次提交
  14. 06 2月, 2013 1 次提交
    • E
      bitmap: add way to find next clear bit · 98fc0137
      Eric Blake 提交于
      We had an easy way to iterate set bits, but not for iterating
      cleared bits.
      
      * src/util/virbitmap.h (virBitmapNextClearBit): New prototype.
      * src/util/virbitmap.c (virBitmapNextClearBit): Implement it.
      * src/libvirt_private.syms (bitmap.h): Export it.
      * tests/virbitmaptest.c (test4): Test it.
      98fc0137
  15. 21 12月, 2012 1 次提交
  16. 26 10月, 2012 1 次提交
    • E
      bitmap: add virBitmapCountBits · 0711c4b7
      Eric Blake 提交于
      Sometimes it's handy to know how many bits are set.
      
      * src/util/bitmap.h (virBitmapCountBits): New prototype.
      (virBitmapNextSetBit): Use correct type.
      * src/util/bitmap.c (virBitmapNextSetBit): Likewise.
      (virBitmapSetAll): Maintain invariant of clear tail bits.
      (virBitmapCountBits): New function.
      * src/libvirt_private.syms (bitmap.h): Export it.
      * tests/virbitmaptest.c (test2): Test it.
      0711c4b7
  17. 21 9月, 2012 1 次提交
  18. 18 9月, 2012 2 次提交
    • H
      New functions for virBitmap · 0fc89098
      Hu Tao 提交于
      In many places we store bitmap info in a chunk of data
      (pointed to by a char *), and have redundant codes to
      set/unset bits. This patch extends virBitmap, and convert
      those codes to use virBitmap in subsequent patches.
      0fc89098
    • H
      bitmap: new member variable and function renaming · 0831a5ba
      Hu Tao 提交于
      Add a new member variable map_len to store map len of bitmap.
      and rename size to max_bit accordingly.
      
      rename virBitmapAlloc to virBitmapNew.
      0831a5ba
  19. 13 9月, 2012 1 次提交
  20. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  21. 24 2月, 2011 2 次提交
  22. 22 5月, 2010 2 次提交
    • E
      build: fix cppi warnings · 0e1f4633
      Eric Blake 提交于
      * src/util/bitmap.h (includes): Placate cppi.
      0e1f4633
    • J
      Add simple bitmap operations to utils · 2f32d7af
      Jim Fehlig 提交于
      V2:
        - Move bitmap impl to src/util/bitmap.[ch]
        - Use CHAR_BIT instead of explicit '8'
        - Use size_t instead of unsigned int
        - Fix calculation of bitmap size in virBitmapAlloc
        - Ensure bit is within range of map in the set, clear, and get
          operations
        - Use bool in virBitmapGetBit
        - Add virBitmapFree to free-like funcs in cfg.mk
      
      V3:
        - Check for overflow in virBitmapAlloc
        - Fix copy and paste bug in virBitmapAlloc
        - Use size_t in prototypes
        - Add ATTRIBUTE_NONNULL in prototypes where appropriate
          and remove NULL check from impl
      
      V4:
        - Add ATTRIBUTE_RETURN_CHECK in prototypes where appropriate.
      2f32d7af