summaryrefslogtreecommitdiff
path: root/e2fsck/dirinfo.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1997-11-14 05:23:04 +0000
committerTheodore Ts'o <tytso@mit.edu>1997-11-14 05:23:04 +0000
commitf8188fff23dc2d9c9f858fb21264e46b17672825 (patch)
tree003f979b0273e095a216787bff3cb14fc7dfb99b /e2fsck/dirinfo.c
parentd36d835b48f3c280b254a9ca6d519d5c97d14ad4 (diff)
downloade2fsprogs-f8188fff23dc2d9c9f858fb21264e46b17672825.tar.gz
Many files:
pass1.c, pass2.c, pass3.c, pass4.c, pass5.c: Add calls to the progress indicator function. pass1.c (scan_callback): Add call to the progress feedback function (if it exists). super.c (check_super_block): Skip the device size check if the get_device_size returns EXT2_EXT_UNIMPLEMENTED. iscan.c (main): Don't use fatal_error() anymore. pass1b.c, swapfs.c, badblocks.c: Set E2F_FLAG_ABORT instead of calling fatal_error(0). problem.c, pass3.c (PR_3_ROOT_NOT_DIR_ABORT, PR_3_NO_ROOT_INODE_ABORT): New problem codes. problem.c, pass2.c (PR_2_SPLIT_DOT): New problem code. problem.c, pass1.c (PR_1_SUPPRESS_MESSAGES): New problem code. problemP.h: New file which separates out the private fix_problem data structures. util.c, dirinfo.c, pass1.c, pass1b.c, pass2.c, pass5.c, super.c, swapfs.c util.c: allocate_memory() now takes a e2fsck context as its first argument, and rename it to be e2fsck_allocate_memory(). problemP.h: New file which contains the private problem abstraction definitions. Makefile.pq: Remove include of MAKEFILE.STD, which doesn't exist at this point.
Diffstat (limited to 'e2fsck/dirinfo.c')
-rw-r--r--e2fsck/dirinfo.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c
index 8d37544e..38a8e437 100644
--- a/e2fsck/dirinfo.c
+++ b/e2fsck/dirinfo.c
@@ -38,9 +38,9 @@ void e2fsck_add_dir_info(e2fsck_t ctx, ino_t ino, ino_t parent)
ctx->dir_info_count = 0;
ctx->dir_info_size = e2fsck_get_num_dirs(ctx) + 10;
- ctx->dir_info = allocate_memory(ctx->dir_info_size *
- sizeof (struct dir_info),
- "directory map");
+ ctx->dir_info = e2fsck_allocate_memory(ctx,
+ ctx->dir_info_size * sizeof (struct dir_info),
+ "directory map");
}
if (ctx->dir_info_count >= ctx->dir_info_size) {
@@ -125,6 +125,14 @@ void e2fsck_free_dir_info(e2fsck_t ctx)
}
/*
+ * Return the count of number of directories in the dir_info structure
+ */
+int e2fsck_get_num_dirinfo(e2fsck_t ctx)
+{
+ return ctx->dir_info_count;
+}
+
+/*
* A simple interator function
*/
struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx, int *control)