diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index c10b5c0a..38b2c131 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,5 +1,8 @@ 2001-06-11 Theodore Tso + * unix.c (PRS): Fix bug introduced in 1.20 which broke the -F + flag. + * Makefile.in: Add message.c and swapfs.c to the list of source files to build the make depend. diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index f26f76b8..710f79ed 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,5 +1,11 @@ 2001-06-11 Theodore Tso + * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions + ext2fs_mark_generic_bitmap and + ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal + functions. (This saves space and doesn't significantly + change the speed of e2fsck on a P-III.) + * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c, inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only include the byte-swapping logic if ENABLE_SWAPFS is turned diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in index 6278b8d2..98444e5d 100644 --- a/lib/ext2fs/Makefile.in +++ b/lib/ext2fs/Makefile.in @@ -30,6 +30,7 @@ OBJS= ext2_err.o \ finddev.o \ flushb.o \ freefs.o \ + gen_bitmap.o \ get_pathname.o \ getsize.o \ icount.o \ @@ -82,6 +83,7 @@ SRCS= ext2_err.c \ $(srcdir)/finddev.c \ $(srcdir)/flushb.c \ $(srcdir)/freefs.c \ + $(srcdir/gen_bitmap.c \ $(srcdir)/get_pathname.c \ $(srcdir)/getsize.c \ $(srcdir)/icount.c \ diff --git a/lib/ext2fs/bitops.h b/lib/ext2fs/bitops.h index f4b8e260..464f5e99 100644 --- a/lib/ext2fs/bitops.h +++ b/lib/ext2fs/bitops.h @@ -354,33 +354,14 @@ _INLINE_ __u32 ext2fs_swab32(__u32 val) #endif /* !_EXT2_HAVE_ASM_SWAB */ -_INLINE_ int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, +/* These two routines moved to gen_bitmap.c */ +extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, __u32 bitno); -_INLINE_ int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, +extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, blk_t bitno); _INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, blk_t bitno); -_INLINE_ int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, - __u32 bitno) -{ - if ((bitno < bitmap->start) || (bitno > bitmap->end)) { - ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno); - return 0; - } - return ext2fs_set_bit(bitno - bitmap->start, bitmap->bitmap); -} - -_INLINE_ int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, - blk_t bitno) -{ - if ((bitno < bitmap->start) || (bitno > bitmap->end)) { - ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno); - return 0; - } - return ext2fs_clear_bit(bitno - bitmap->start, bitmap->bitmap); -} - _INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, blk_t bitno) { @@ -627,7 +608,6 @@ _INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, for (i=0; i < num; i++) ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap); } - #undef _INLINE_ #endif diff --git a/lib/ext2fs/gen_bitmap.c b/lib/ext2fs/gen_bitmap.c new file mode 100644 index 00000000..700affa1 --- /dev/null +++ b/lib/ext2fs/gen_bitmap.c @@ -0,0 +1,48 @@ +/* + * gen_bitmap.c --- Generic bitmap routines that used to be inlined. + * + * Copyright (C) 2001 Theodore Ts'o. + * + * %Begin-Header% + * This file may be redistributed under the terms of the GNU Public + * License. + * %End-Header% + */ + + +#include +#include +#if HAVE_UNISTD_H +#include +#endif +#include +#include +#if HAVE_SYS_STAT_H +#include +#endif +#if HAVE_SYS_TYPES_H +#include +#endif + +#include "ext2_fs.h" +#include "ext2fs.h" + +int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, + __u32 bitno) +{ + if ((bitno < bitmap->start) || (bitno > bitmap->end)) { + ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno); + return 0; + } + return ext2fs_set_bit(bitno - bitmap->start, bitmap->bitmap); +} + +int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, + blk_t bitno) +{ + if ((bitno < bitmap->start) || (bitno > bitmap->end)) { + ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno); + return 0; + } + return ext2fs_clear_bit(bitno - bitmap->start, bitmap->bitmap); +}