ChangeLog, pass3.c, problem.c:
pass3.c (get_lost_and_found): If the filesystem is not opened
read-only, then force /lost+found to be created if it is not present.
problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen operation.
ChangeLog, Makefile.in:
Makefile.in: Updated dependencies.
ChangeLog, fsck.c:
fsck.c (load_fs_info): Parse /etc/fstab ourselves, instead of relying
on getmntent(). This has the advantage of allowing us to properly
handle missing pass numbers correctly.
ChangeLog, configure.in:
configure.in: Add paths.h to header files for which we search.
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 0e651f5..b569938 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,3 +1,16 @@
+1998-12-03 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Makefile.in: Updated dependencies.
+
+1998-11-27 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * pass3.c (get_lost_and_found): If the filesystem is not opened
+ read-only, then force /lost+found to be created if it is
+ not present.
+
+ * problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen
+ operation.
+
1998-10-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
* unix.c (main): Move ext2fs_close() after e2fsck_free_context()
diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
index d93624c..cec98e7 100644
--- a/e2fsck/Makefile.in
+++ b/e2fsck/Makefile.in
@@ -151,25 +151,23 @@
# Makefile dependencies follow. This must be the last section in
# the Makefile.in file
#
-e2fsck.o: $(srcdir)/e2fsck.c $(top_srcdir)/lib/et/com_err.h \
- $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+e2fsck.o: $(srcdir)/e2fsck.c $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h \
- $(srcdir)/../version.h
+ $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass1.o: $(srcdir)/pass1.c $(srcdir)/e2fsck.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \
$(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
-pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h \
+pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h \
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
@@ -189,24 +187,23 @@
$(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/bitops.h
-util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h \
+util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
+unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h $(srcdir)/e2fsck.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/problem.h $(srcdir)/../version.h
+dirinfo.o: $(srcdir)/dirinfo.c $(srcdir)/e2fsck.h \
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h
-unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h \
- $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h \
- $(srcdir)/../version.h
-dirinfo.o: $(srcdir)/dirinfo.c $(top_srcdir)/lib/et/com_err.h \
- $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/bitops.h
ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h
+ $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
+ $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/problem.h $(srcdir)/problemP.h
diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c
index 0700698..560f291 100644
--- a/e2fsck/pass3.c
+++ b/e2fsck/pass3.c
@@ -124,6 +124,12 @@
check_directory(ctx, dir, &pctx);
}
+ /*
+ * Force the creation of /lost+found if not present
+ */
+ if ((ctx->flags & E2F_OPT_READONLY) == 0)
+ get_lost_and_found(ctx);
+
abort_exit:
e2fsck_free_dir_info(ctx);
if (inode_loop_detect)
diff --git a/e2fsck/problem.c b/e2fsck/problem.c
index e9ef1cf..5113d4a 100644
--- a/e2fsck/problem.c
+++ b/e2fsck/problem.c
@@ -710,7 +710,7 @@
/* /lost+found not found */
{ PR_3_NO_LF_DIR,
"/@l not found. ",
- PROMPT_CREATE, 0 },
+ PROMPT_CREATE, PR_PREEN_OK },
/* .. entry is incorrect */
{ PR_3_BAD_DOT_DOT,