Whamcloud - gitweb
badblocks.c (ext2fs_u32_list_count), ext2fs.h: Add new function
authorTheodore Ts'o <tytso@mit.edu>
Fri, 14 Mar 2003 05:59:42 +0000 (00:59 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 14 Mar 2003 05:59:42 +0000 (00:59 -0500)
which returns the number of entries in the list.

lib/ext2fs/ChangeLog
lib/ext2fs/badblocks.c
lib/ext2fs/ext2fs.h

index 36631cc..5e3b37e 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * badblocks.c (ext2fs_u32_list_count), ext2fs.h: Add new function
+               which returns the number of entries in the list.
+
 2003-03-10  Theodore Ts'o  <tytso@mit.edu>
 
        * fileio.c (ext2fs_file_lseek): Fix bug added when adding 64-bit
index 6f9ef95..7e1d24f 100644 (file)
@@ -287,3 +287,8 @@ int ext2fs_badblocks_equal(ext2_badblocks_list bb1, ext2_badblocks_list bb2)
        return ext2fs_u32_list_equal((ext2_u32_list) bb1,
                                     (ext2_u32_list) bb2);
 }
+
+int ext2fs_u32_list_count(ext2_u32_list bb)
+{
+       return bb->num;
+}
index af3450f..926d5af 100644 (file)
@@ -501,6 +501,7 @@ extern errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src,
                                       ext2_badblocks_list *dest);
 extern int ext2fs_badblocks_equal(ext2_badblocks_list bb1,
                                  ext2_badblocks_list bb2);
+extern int ext2fs_u32_list_count(ext2_u32_list bb);
 
 /* bb_compat */
 extern errcode_t badblocks_list_create(badblocks_list *ret, int size);