From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: Mon, 9 Sep 96 11:02:58 +0200
Reply-To: schwab@issan.informatik.uni-dortmund.de
To: tytso@MIT.EDU
Subject: e2fsprogs-1.05-WIP
X-Yow: Yow!  Is my fallout shelter termite proof?

Hi!

This patch fixes a few glitches in the e2fsprogs-1.05-WIP.  I have also
fixed the command for .depend to use only two processes instead of seven.

Andreas.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"

----------------------------------------------------------------------
--- e2fsprogs-1.05/MCONFIG.in.~1~	Wed Aug 21 02:43:58 1996
+++ e2fsprogs-1.05/MCONFIG.in	Tue Sep  3 14:44:49 1996
@@ -144,12 +144,12 @@
 .depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed
 	if test -n "$(SRCS)" ; then \
 		$(CC) -M $(ALL_CFLAGS) $(SRCS) | \
-			sed -f $(top_srcdir)/depfix.sed | \
-			sed -e 's; $(srcdir)/; $$(srcdir)/;g' | \
-			sed -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' | \
-			sed -e 's; $(top_builddir)/; $$(top_builddir)/;g' | \
-			sed -e 's; \./; ;g' | \
-		grep -v "  \\\\$$" > .depend; \
+			sed -f $(top_srcdir)/depfix.sed \
+			    -e 's; $(srcdir)/; $$(srcdir)/;g' \
+			    -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
+			    -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
+			    -e 's; \./; ;g' \
+			    -e '/^ *\\$$/d' > .depend; \
 	else :; fi
 
 depend:: .depend
--- e2fsprogs-1.05/debugfs/debugfs.c.~1~	Sat Aug 31 06:11:31 1996
+++ e2fsprogs-1.05/debugfs/debugfs.c	Sat Sep  7 09:36:59 1996
@@ -198,7 +198,7 @@
 		uuid_unparse(sb->s_uuid, buf);
 	else
 		strcpy(buf, none);
-	printf("Filesystem UUID = %s\n", buf);
+	fprintf(out, "Filesystem UUID = %s\n", buf);
 	fprintf(out, "Last mount time = %s", time_to_string(sb->s_mtime));
 	fprintf(out, "Last write time = %s", time_to_string(sb->s_wtime));
 	fprintf(out, "Mount counts = %d (maximal = %d)\n",
@@ -914,7 +914,7 @@
 	
 	basename = strrchr(filename, '/');
 	if (basename) {
-		*basename++ = '0';
+		*basename++ = '\0';
 		dir = string_to_inode(filename);
 		if (!dir)
 			return;
@@ -1329,6 +1329,7 @@
 	printf("Kill file by inode %ld\n", inode);
 	ext2fs_block_iterate(current_fs, inode, 0, NULL,
 			     release_blocks_proc, NULL);
+	printf("\n");
 	ext2fs_unmark_inode_bitmap(current_fs->inode_map, inode);
 
 	ext2fs_mark_bb_dirty(current_fs);
@@ -1401,8 +1402,9 @@
 {
 	FILE *out = stdout;
 
-	fprintf(out, "Open mode: read-%s\n",
-		current_fs->flags & EXT2_FLAG_RW ? "write" : "only");
+	if (current_fs)
+		fprintf(out, "Open mode: read-%s\n",
+			current_fs->flags & EXT2_FLAG_RW ? "write" : "only");
 	fprintf(out, "Filesystem in use: %s\n",
 		current_fs ? current_fs->device_name : "--none--");
 }
@@ -1468,7 +1470,7 @@
 {
 	int		retval;
 	int		sci_idx;
-	const char	*usage = "Usage: debugfs [[-w] device]";
+	const char	*usage = "Usage: debugfs [-w] [device]";
 	char		c;
 	int		open_flags = 0;
 	char		*request = 0;
--- e2fsprogs-1.05/debugfs/util.c.~1~	Sat Aug 31 06:09:28 1996
+++ e2fsprogs-1.05/debugfs/util.c	Tue Sep  3 15:04:04 1996
@@ -101,8 +101,9 @@
 {
 	if (!(current_fs->flags & EXT2_FLAG_RW)) {
 		com_err(name, 0, "Filesystem opened read/only");
-		return;
+		return 1;
 	}
+	return 0;
 }
 
 /*
--- e2fsprogs-1.05/tests/Makefile.in.~1~	Thu Aug 29 04:39:03 1996
+++ e2fsprogs-1.05/tests/Makefile.in	Tue Sep  3 14:58:49 1996
@@ -23,7 +23,7 @@
 check:: test_script
 	@echo "Running e2fsprogs test suite..."
 	@echo " "
-	@test_script
+	@./test_script
 
 clean::
 	$(RM) -f *.log *.new *.failed *.ok test.img test_script
