History log of /external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
47fee2ef6a23ae06f680336ffde57caa64604a4c 06-Jul-2014 Lukas Czerner <lczerner@redhat.com> e2fsprogs: introduce ext2fs_close_free() helper

Currently there are many uses of ext2fs_close() which might be wrong.
First of all ext2fs_close() does not set the ext2_filsys pointer to NULL
so the caller is responsible for clearing it, however there are some
cases there we do not do it.

Second of all very small number of users of ext2fs_close() actually
check the return value. If there is a problem in ext2fs_close() it will
not even free the ext2_filsys structure, but majority of users expect it
to do so.

To fix both problems this commit introduces a new helper
ext2fs_close_free() which will not only check for the return value and
free the ext2_filsys structure if the call to ext2fs_close2() failed,
but it will also set the ext2_filsys pointer to NULL.

Replace every use of ext2fs_close() in e2fsprogs tools with
ext2fs_close_free() - there is no real reason to keep using
ext2fs_close().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
dff0b6a333821ec28bfa029ffbc0dffb46c43170 12-Jan-2014 Theodore Ts'o <tytso@mit.edu> libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2()

Add functions which try to find the first set block or inode in a
bitmap. This is useful when trying to allocate a range of blocks
efficiently.

Like the find_first_zero family of functions, provide a generic O(N)
search function which will be used if there is no optimized version
provided by the red-black tree or bitarray functions.

Also, expand the test cases for ext2fs_find_first_zero_*() functions.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
00eb0eee0addfd3b7ede98b85e00dff1547838a0 29-Nov-2012 Andreas Dilger <adilger@dilger.ca> build: quiet some "gcc -Wall" compiler warnings

Quiet a number of simple compiler warnings:
- pointers not initialized by ext2fs_get_mem()
- return without value in non-void function
- dereferencing type-punned pointers
- unused variables

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
c6b006ea6c9fec7f3f33347a52efc396063bcd26 24-Nov-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: add ext2fs_bitcount() function

This function efficiently counts the number of bits in a block of
memory.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
ab3f5c5aad6310be1d1891c05f1bc8cf7ccf0cef 10-Sep-2012 Theodore Ts'o <tytso@mit.edu> Allow e2fsprogs to be built using the clang (LLVM) frontend

Since clang uses C99 semantics by default, the main changes required
to allow clang to build e2fsprogs was to add support the C99 inline
semantics, while still allowing us to be built when the legacy (but
still default for gcc) GNU C89 inline semantics are in force.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
46f100707c3cd07e271b0c6f5523ec6ca1ac4416 06-Apr-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: improve testing coverage of tst_bitmaps

Improve the test coverage of tst_bitmaps by:

(a) adding the ability to test the legacy (32-bit) bitmap code
(b) adding tests for ext2fs_find_first_zero_inode_bitmap2() and
ext2fs_find_first_zero_block_bitmap2()

The recent regressions caused by the addition (and use) of
ext2fs_find_first_zero_inode_bitmap2() would have been caught if we
had added these tests first. (Another object lesson in why unit tests
are critically important!)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c
b8ad88b3e746b0c37dfb61e0fe7ad7a7636f9537 18-Dec-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: add tests for the bitmap functions

These tests allow us to be sure that the new bitmap backends are
correctly implemented.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/tst_bitmaps.c