1. 03 6月, 2015 1 次提交
  2. 13 4月, 2015 1 次提交
  3. 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
  4. 31 1月, 2015 1 次提交
  5. 29 1月, 2015 1 次提交
  6. 15 11月, 2014 1 次提交
  7. 04 11月, 2014 1 次提交
  8. 12 8月, 2014 1 次提交
  9. 29 7月, 2014 1 次提交
  10. 06 6月, 2014 3 次提交
  11. 25 3月, 2014 1 次提交
  12. 10 3月, 2014 1 次提交
  13. 22 8月, 2013 1 次提交
  14. 16 8月, 2013 1 次提交
    • P
      virbitmap: Refactor virBitmapParse to avoid access beyond bounds of array · 47b9127e
      Peter Krempa 提交于
      The virBitmapParse function was calling virBitmapIsSet() function that
      requires the caller to check the bounds of the bitmap without checking
      them. This resulted into crashes when parsing a bitmap string that was
      exceeding the bounds used as argument.
      
      This patch refactors the function to use virBitmapSetBit without
      checking if the bit is set (this function does the checks internally)
      and then counts the bits in the bitmap afterwards (instead of keeping
      track while parsing the string).
      
      This patch also changes the "parse_error" label to a more common
      "error".
      
      The refactor should also get rid of the need to call sa_assert on the
      returned variable as the callpath should allow coverity to infer the
      possible return values.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=997367
      
      Thanks to Alex Jia for tracking down the issue. This issue is introduced
      by commit 0fc89098.
      47b9127e
  15. 11 7月, 2013 1 次提交
  16. 10 7月, 2013 1 次提交
  17. 24 5月, 2013 1 次提交
  18. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  19. 06 4月, 2013 1 次提交
  20. 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
  21. 23 1月, 2013 1 次提交
    • P
      util: Fix docs for virBitmapParse · 4004977f
      Peter Krempa 提交于
      This patch changes the name of the @sep argument to @terminator and
      clarifies it's usage. This patch also explicitly documents that
      whitespace can't be used as @terminator as it is skipped multiple times
      in the implementation.
      4004977f
  22. 15 1月, 2013 1 次提交
    • J
      xen: Resolve resource leak with 'cpuset' · 8bc18eaa
      John Ferlan 提交于
      Make cpuset local to the while loop and free it once done with it each
      time through the loop.  Add a sa_assert() to virBitmapParse() to keep Coverity
      from believing there could be a negative return and possible resource leak.
      8bc18eaa
  23. 21 12月, 2012 4 次提交
  24. 28 11月, 2012 1 次提交
  25. 02 11月, 2012 1 次提交
  26. 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
  27. 21 9月, 2012 1 次提交
  28. 19 9月, 2012 2 次提交
    • E
      bitmap: fix problems in previous commit · fd66ea66
      Eric Blake 提交于
      Commit ee3d3893 missed the fact that (unsigned char)<<(int)
      is truncated to int, and therefore failed for any bitmap data
      longer than four bytes.
      
      Also, I failed to run 'make syntax-check' on my commit 4bba6579;
      for whatever odd reason, ffs lives in a different header than ffsl.
      
      * src/util/bitmap.c (virBitmapNewData): Use correct shift type.
      (includes): Glibc (and therefore gnulib) decided ffs is in
      <strings.h>, but ffsl is in <string.h>.
      * tests/virbitmaptest.c (test5): Test it.
      fd66ea66
    • E
      build: avoid non-portable byte-swapping · 4bba6579
      Eric Blake 提交于
      Commit 0fc89098 used functions only available on glibc, completely
      botched 32-bit environments, and risked SIGBUS due to unaligned
      memory access on platforms that aren't as forgiving as x86_64.
      
      * bootstrap.conf (gnulib_modules): Import ffsl.
      * src/util/bitmap.c (includes): Use <strings.h> for ffsl.
      (virBitmapNewData, virBitmapToData): Avoid 64-bit assumptions and
      non-portable functions.
      4bba6579
  29. 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
  30. 13 9月, 2012 1 次提交
  31. 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
  32. 06 5月, 2011 1 次提交
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  33. 24 2月, 2011 1 次提交