Whamcloud - gitweb
ChangeLog, e2fsck.8.in, e2fsck.h, pass3.c, pass4.c, super.c:
authorTheodore Ts'o <tytso@mit.edu>
Mon, 16 Feb 1998 22:34:46 +0000 (22:34 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 16 Feb 1998 22:34:46 +0000 (22:34 +0000)
  e2fsck.h: Add new field, priv_data to the e2fsck context structure.
   It should be used by callers of the e2fsck functions only, and not by
   anything in e2fsck itself.
  super.c: Instead of call ext2fs_get_device_size(), define and call
   e2fsck_get_device_size().  (This function may be stubbed out in
   special versions of e2fsck.)
  pass3.c, pass4.c: Remove extra calls to the progress function that
   weren't needed.
  mke2fs.8.in: Update man page to note that the format of the bad block
   file is the same as the one generated by badblocks.

e2fsck/ChangeLog
e2fsck/e2fsck.8.in
e2fsck/e2fsck.h
e2fsck/pass3.c
e2fsck/pass4.c
e2fsck/super.c

index 43343b8..3178f4d 100644 (file)
@@ -1,3 +1,21 @@
+Mon Feb 16 17:31:44 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * e2fsck.h: Add new field, priv_data to the e2fsck context
+               structure.  It should be used by callers of the e2fsck
+               functions only, and not by anything in e2fsck itself.
+
+Mon Feb 7 17:31:04 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * super.c: Instead of call ext2fs_get_device_size(), define and call
+               e2fsck_get_device_size().  (This function may be stubbed
+               out in special versions of e2fsck.)
+
+       * pass3.c, pass4.c: Remove extra calls to the progress function
+               that weren't needed.
+
+       * mke2fs.8.in: Update man page to note that the format of the bad
+               block file is the same as the one generated by badblocks. 
+
 Sun Feb  1 07:57:14 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * dirinfo.c, e2fsck.c: Don't include com_err.h; it isn't needed.
index 03cbd68..62e7bae 100644 (file)
@@ -85,7 +85,10 @@ time trials.
 .I -l filename
 Add the blocks listed in the file specified by 
 .I filename
-to the list of bad blocks.
+to the list of bad blocks.  The format of this file is the same as the
+one generated by the 
+.BR badblocks (8)
+program.
 .TP
 .I -L filename
 Set the bad blocks list to be the list of blocks specified by 
index 0ce5185..140c018 100644 (file)
@@ -205,6 +205,12 @@ struct e2fsck_struct {
        int fs_dind_count;
        int fs_tind_count;
        int fs_fragmented;
+
+       /*
+        * For the use of callers of the e2fsck functions; not used by
+        * e2fsck functions themselves.
+        */
+       void *priv_data;
 };
 
 
index 817bf08..f4ab612 100644 (file)
@@ -112,8 +112,6 @@ void e2fsck_pass3(e2fsck_t ctx)
        max = e2fsck_get_num_dirinfo(ctx);
        count = 0;
 
-       if (ctx->progress)
-               (ctx->progress)(ctx, 3, 0, max);
        for (i=0; (dir = e2fsck_dir_info_iter(ctx, &i)) != 0;) {
                if (ctx->progress)
                        (ctx->progress)(ctx, 3, count++, max);
index a140be7..c45ccd9 100644 (file)
@@ -148,8 +148,6 @@ void e2fsck_pass4(e2fsck_t ctx)
        ext2fs_free_icount(ctx->inode_count); ctx->inode_count = 0;
        ext2fs_free_inode_bitmap(ctx->inode_bb_map);
        ctx->inode_bb_map = 0;
-       if (ctx->progress)
-               (ctx->progress)(ctx, 4, max, max);      
 #ifdef RESOURCE_TRACK
        if (ctx->options & E2F_OPT_TIME2)
                print_resource_track("Pass 4", &rtrack);
index cb16a25..5c0e54d 100644 (file)
@@ -31,7 +31,6 @@
 #endif
 #include "e2fsck.h"
 #include "problem.h"
-#include "../version.h"
 
 #define MIN_CHECK 1
 #define MAX_CHECK 2
@@ -52,6 +51,21 @@ static void check_super_value(e2fsck_t ctx, const char *descr,
        }
 }
 
+/*
+ * This routine may get stubbed out in special compilations of the
+ * e2fsck code..
+ */
+#ifndef EXT2_SPECIAL_DEVICE_SIZE
+errcode_t e2fsck_get_device_size(e2fsck_t ctx)
+{
+       return (ext2fs_get_device_size(ctx->filesystem_name,
+                                      EXT2_BLOCK_SIZE(ctx->fs->super),
+                                      &ctx->num_blocks));
+}
+#else
+extern errcode_t e2fsck_get_device_size(e2fsck_t ctx);
+#endif
+
 void check_super_block(e2fsck_t ctx)
 {
        ext2_filsys fs = ctx->fs;
@@ -95,8 +109,7 @@ void check_super_block(e2fsck_t ctx)
                          MAX_CHECK, 0, s->s_blocks_count);
 
        if (!ctx->num_blocks) {
-               pctx.errcode = ext2fs_get_device_size(ctx->filesystem_name,
-                             EXT2_BLOCK_SIZE(s), &ctx->num_blocks);
+               pctx.errcode = e2fsck_get_device_size(ctx);
                if (pctx.errcode && pctx.errcode != EXT2_ET_UNIMPLEMENTED) {
                        fix_problem(ctx, PR_0_GETSIZE_ERROR, &pctx);
                        ctx->flags |= E2F_FLAG_ABORT;