Many files:
  resize2fs.c, ext2_block_move.c ext2_inode_move.c: Only include printf
  	statements if RESIZE2FS_DEBUG is defined.
  main.c: Don't read in the bitmaps since resize2fs.c does that.
e2label.c, mke2fs.c:
  Adjust header files.

diff --git a/misc/e2label.c b/misc/e2label.c
index 2b4f171..928a896 100644
--- a/misc/e2label.c
+++ b/misc/e2label.c
@@ -5,8 +5,24 @@
  *
  */
 
-#include <fcntl.h>
 #include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <termios.h>
+#include <time.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
 
 #define EXT2_SUPER_MAGIC 0xEF53
 
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 81a0262..47dfc42 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -36,11 +36,9 @@
 #ifdef HAVE_MNTENT_H
 #include <mntent.h>
 #endif
-#include <malloc.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <stdio.h>
 
 #ifdef HAVE_LINUX_FS_H
 #include <linux/fs.h>
diff --git a/resize/ChangeLog b/resize/ChangeLog
index bb559ee..3a957f9 100644
--- a/resize/ChangeLog
+++ b/resize/ChangeLog
@@ -1,3 +1,10 @@
+Mon Nov  3 14:45:06 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+	* resize2fs.c, ext2_block_move.c ext2_inode_move.c: Only include
+		printf statements if RESIZE2FS_DEBUG is defined.
+
+	* main.c: Don't read in the bitmaps since resize2fs.c does that.
+
 Sun Oct 19 20:40:42 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
 	* resize2fs.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H.
diff --git a/resize/Makefile.pq b/resize/Makefile.pq
index c383c87..5421c6d 100644
--- a/resize/Makefile.pq
+++ b/resize/Makefile.pq
@@ -5,8 +5,7 @@
 OBJS= extent.obj \
 	ext2_block_move.obj \
 	ext2_inode_move.obj \
-	resize2fs.obj \
-	sim_progress.obj
+	resize2fs.obj
 
 ALL:: $(OBJS)
 
diff --git a/resize/ext2_block_move.c b/resize/ext2_block_move.c
index ec60edf..3170e95 100644
--- a/resize/ext2_block_move.c
+++ b/resize/ext2_block_move.c
@@ -34,9 +34,11 @@
 	if (new) {
 		*block_nr = new;
 		ret |= BLOCK_CHANGED;
+#ifdef RESIZE2FS_DEBUG
 		if (pb->flags & RESIZE_DEBUG_BMOVE)
 			printf("ino=%ld, blockcnt=%d, %u->%u\n", pb->ino,
 			       blockcnt, block, new);
+#endif
 	}
 
 	if (pb->is_dir) {
@@ -125,9 +127,11 @@
 		if (retval) goto errout;
 		if (!size)
 			break;
+#ifdef RESIZE2FS_DEBUG
 		if (rfs->flags & RESIZE_DEBUG_BMOVE)
 			printf("Moving %d blocks %u->%u\n", size,
 			       old, new);
+#endif
 		do {
 			c = size;
 			if (c > fs->inode_blocks_per_group)
diff --git a/resize/ext2_inode_move.c b/resize/ext2_inode_move.c
index 5d26b15..3ec74b8 100644
--- a/resize/ext2_inode_move.c
+++ b/resize/ext2_inode_move.c
@@ -56,10 +56,12 @@
 
 	if (!new)
 		return 0;
+#ifdef RESIZE2FS_DEBUG
 	if (is->flags & RESIZE_DEBUG_INODEMAP)
 		printf("Inode translate (dir=%ld, name=%.*s, %u->%ld)\n",
 		       dir, dirent->name_len, dirent->name,
 		       dirent->inode, new);
+#endif
 
 	dirent->inode = new;
 
@@ -251,8 +253,10 @@
 		if (LINUX_S_ISDIR(inode.i_mode))
 			rfs->new_fs->group_desc[group].bg_used_dirs_count++;
 		
+#ifdef RESIZE2FS_DEBUG
 		if (rfs->flags & RESIZE_DEBUG_INODEMAP)
 			printf("Inode moved %ld->%ld\n", ino, new);
+#endif
 
 		ext2fs_add_extent_entry(imap, ino, new);
 	}
diff --git a/resize/main.c b/resize/main.c
index b5e5a7f..7765052 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -104,13 +104,6 @@
 		printf ("Couldn't find valid filesystem superblock.\n");
 		exit (1);
 	}
-	retval = ext2fs_read_bitmaps(fs);
-	if (retval) {
-		com_err (program_name, retval,
-			 "while trying to read the bitmaps", device_name);
-		ext2fs_close (fs);
-		exit (1);
-	}
 	retval = resize_fs(fs, new_size, flags);
 	if (retval) {
 		com_err(program_name, retval, "while trying to resize %s",
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 66e0b20..1345708 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -574,10 +574,12 @@
 		new = fs->group_desc[i].bg_inode_table;
 		diff = new - old;
 		
+#ifdef RESIZE2FS_DEBUG
 		if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE) 
 			printf("Itable move group %d block "
 			       "%u->%u (diff %d)\n", 
 			       i, old, new, diff);
+#endif
 		
 		if (!diff)
 			continue;
@@ -596,8 +598,10 @@
 			if (*cp)
 				break;
 		n = n >> EXT2_BLOCK_SIZE_BITS(fs->super);
+#ifdef RESIZE2FS_DEBUG
 		if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE) 
 			printf("%d blocks of zeros...\n", n);
+#endif
 		num = fs->inode_blocks_per_group;
 		if (n > diff)
 			num -= n;
@@ -622,8 +626,10 @@
 	}
 	ext2fs_flush(rfs->new_fs);
 	io_channel_flush(fs->io);
+#ifdef RESIZE2FS_DEBUG
 	if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE) 
 		printf("Inode table move finished.\n");
+#endif
 	if (progress)
 		ext2fs_progress_close(progress);
 	return 0;
@@ -631,11 +637,15 @@
 backout:
 	if (progress)
 		ext2fs_progress_close(progress);
+#ifdef RESIZE2FS_DEBUG
 	if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE) 
 		printf("Error: %s; now backing out!\n", error_message(retval));
+#endif
 	while (--i >= 0) {
+#ifdef RESIZE2FS_DEBUG
 		if (rfs->flags & RESIZE_DEBUG_ITABLEMOVE) 
 			printf("Group %d block %u->%u\n", i, new, old);
+#endif
 		old = rfs->old_fs->group_desc[i].bg_inode_table;
 		new = fs->group_desc[i].bg_inode_table;
 		
@@ -746,11 +756,13 @@
 	if (retval)
 		goto errout;
 
+#ifdef RESIZE2FS_DEBUG
 	if (rfs->flags & RESIZE_DEBUG_BMOVE)
 		printf("Number of free blocks: %d/%d, Needed: %d\n",
 		       rfs->old_fs->super->s_free_blocks_count,
 		       rfs->new_fs->super->s_free_blocks_count,
 		       rfs->needed_blocks);
+#endif
 	
 	retval = ext2fs_block_move(rfs);
 	if (retval)