ext2_io.h, ext2fs.h: Protect against being included multiple times.
bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
test_io.c (test_flush): Add a debugging printf when the flush method
is called.
rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already read
in, return right away.
+Mon Feb 16 16:16:00 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * ext2_io.h, ext2fs.h: Protect against being included multiple times.
+
+ * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
+
+ * test_io.c (test_flush): Add a debugging printf when the flush
+ method is called.
+
+ * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
+ read in, return right away.
+
Sun Feb 1 08:20:24 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
* bitops.h: Don't try to do i386 inline asm functions if the
#include <linux/ext2_fs.h>
#endif
-#include "ext2fs/ext2fs.h"
+#include "ext2fsP.h"
struct process_block_struct {
ino_t ino;
* %End-Header%
*/
+#ifndef _EXT2FS_EXT2_IO_H
+#define _EXT2FS_EXT2_IO_H
+
/*
* ext2_loff_t is defined here since unix_io.c needs it.
*/
(unsigned long block, int count, errcode_t err);
extern void (*test_io_cb_set_blksize)
(int blksize, errcode_t err);
+
+#endif /* _EXT2FS_EXT2_IO_H */
+
* %End-Header%
*/
+#ifndef _EXT2FS_EXT2FS_H
+#define _EXT2FS_EXT2FS_H
+
/*
* Non-GNU C compilers won't necessarily understand inline
*/
#undef _INLINE_
#endif
+#endif /* _EXT2FS_EXT2FS_H */
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+ if (fs->inode_map && fs->block_map)
+ return 0;
+
return read_bitmaps(fs, !fs->inode_map, !fs->block_map);
}
static errcode_t test_flush(io_channel channel)
{
struct test_private_data *data;
+ errcode_t retval = 0;
EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
data = (struct test_private_data *) channel->private_data;
EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
if (data->real)
- return io_channel_flush(data->real);
- return 0;
+ retval = io_channel_flush(data->real);
+
+ printf("Test_io: flush() returned %s\n",
+ retval ? error_message(retval) : "OK");
+
+ return retval;
}