diff options
author | Theodore Ts'o <tytso@mit.edu> | 1997-10-03 17:48:10 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1997-10-03 17:48:10 +0000 |
commit | 1b6bf1759af884957234b7dce768b785f792abd0 (patch) | |
tree | 275137be213c5a3d049080df8febbeac4b857684 /e2fsck/ehandler.c | |
parent | d163b0948731e6d84bd3efe75075a2d0a8009272 (diff) | |
download | e2fsprogs-1b6bf1759af884957234b7dce768b785f792abd0.tar.gz |
Many files:
pass*.c, super.c: Massive changes to avoid using printf and com_err
routines. All diagnostic messages are now routed through the
fix_problem interface.
pass2.c (check_dir_block): Check for duplicate '.' and '..' entries.
problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
PR_2_DUP_DOT_DOT.
problem.c: Added new problem codes for some of the superblock
corruption checks, and for the pass header messages. ("Pass
1: xxxxx")
util.c (print_resource_track): Now takes a description argument.
super.c, unix.c, e2fsck.c: New files to separate out the
operating-specific operations out from e2fsck.c. e2fsck.c now
contains the global e2fsck context management routines, and
super.c contains the "pass 0" initial validation of the
superblock and global block group descriptors.
pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
(nearly) all global variables and moved them to the e2fsck
context structure.
problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS, PR_0_BLOCKS_PER_GROUP,
PR_0_FIRST_DATA_BLOCK
expect.1, expect.2:
Updated tests to align with e2fsck problem.c changes.
Diffstat (limited to 'e2fsck/ehandler.c')
-rw-r--r-- | e2fsck/ehandler.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/e2fsck/ehandler.c b/e2fsck/ehandler.c index 131a0abb..b3707564 100644 --- a/e2fsck/ehandler.c +++ b/e2fsck/ehandler.c @@ -29,6 +29,10 @@ static errcode_t e2fsck_handle_read_error(io_channel channel, { int i; char *p; + ext2_filsys fs = channel->app_data; + e2fsck_t ctx; + + ctx = fs->private; /* * If more than one block was read, try reading each block @@ -51,8 +55,8 @@ static errcode_t e2fsck_handle_read_error(io_channel channel, else printf("Error reading block %lu (%s). ", block, error_message(error)); - preenhalt(NULL); - if (ask("Ignore error", 1)) + preenhalt(ctx); + if (ask(ctx, "Ignore error", 1)) return 0; return error; @@ -68,7 +72,11 @@ static errcode_t e2fsck_handle_write_error(io_channel channel, { int i; const char *p; + ext2_filsys fs = channel->app_data; + e2fsck_t ctx; + ctx = fs->private; + /* * If more than one block was written, try writing each block * separately. We could use the actual bytes read to figure @@ -91,8 +99,8 @@ static errcode_t e2fsck_handle_write_error(io_channel channel, else printf("Error writing block %lu (%s). ", block, error_message(error)); - preenhalt(NULL); - if (ask("Ignore error", 1)) + preenhalt(ctx); + if (ask(ctx, "Ignore error", 1)) return 0; return error; |