2001-06-11 Theodore Tso <tytso@valinux.com>
+ * 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.
2001-06-11 Theodore Tso <tytso@valinux.com>
+ * 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
finddev.o \
flushb.o \
freefs.o \
+ gen_bitmap.o \
get_pathname.o \
getsize.o \
icount.o \
$(srcdir)/finddev.c \
$(srcdir)/flushb.c \
$(srcdir)/freefs.c \
+ $(srcdir/gen_bitmap.c \
$(srcdir)/get_pathname.c \
$(srcdir)/getsize.c \
$(srcdir)/icount.c \
#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)
{
for (i=0; i < num; i++)
ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap);
}
-
#undef _INLINE_
#endif
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#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);
+}