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.
+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.
.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
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;
};
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);
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);
#endif
#include "e2fsck.h"
#include "problem.h"
-#include "../version.h"
#define MIN_CHECK 1
#define MAX_CHECK 2
}
}
+/*
+ * 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;
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;