extern void ehandler_init(io_channel channel);
/* journal.c */
-extern int e2fsck_check_ext3_journal(e2fsck_t ctx);
-extern int e2fsck_run_ext3_journal(e2fsck_t ctx);
+extern errcode_t e2fsck_check_ext3_journal(e2fsck_t ctx);
+extern errcode_t e2fsck_run_ext3_journal(e2fsck_t ctx);
extern void e2fsck_move_ext3_journal(e2fsck_t ctx);
extern int e2fsck_fix_ext3_journal_hint(e2fsck_t ctx);
retval= ext2fs_bmap2(inode->i_ctx->fs, inode->i_ino,
&inode->i_ext2, NULL, 0, block, 0, &pblk);
*phys = pblk;
- return (retval);
+ return (int) retval;
#endif
}
void ll_rw_block(int rw, int nr, struct buffer_head *bhp[])
{
- int retval;
+ errcode_t retval;
struct buffer_head *bh;
for (; nr > 0; --nr) {
com_err(bh->b_ctx->device_name, retval,
"while reading block %llu\n",
bh->b_blocknr);
- bh->b_err = retval;
+ bh->b_err = (int) retval;
continue;
}
bh->b_uptodate = 1;
com_err(bh->b_ctx->device_name, retval,
"while writing block %llu\n",
bh->b_blocknr);
- bh->b_err = retval;
+ bh->b_err = (int) retval;
continue;
}
bh->b_dirty = 0;
#else
journal->j_inode = j_inode;
ctx->journal_io = ctx->fs->io;
- if ((retval = journal_bmap(journal, 0, &start)) != 0)
+ if ((retval = (errcode_t) journal_bmap(journal, 0, &start)) != 0)
goto errout;
#endif
} else {
* This function makes sure that the superblock fields regarding the
* journal are consistent.
*/
-int e2fsck_check_ext3_journal(e2fsck_t ctx)
+errcode_t e2fsck_check_ext3_journal(e2fsck_t ctx)
{
struct ext2_super_block *sb = ctx->fs->super;
journal_t *journal;
struct problem_context pctx;
problem_t problem;
int reset = 0, force_fsck = 0;
- int retval;
+ errcode_t retval;
/* If we don't have any journal features, don't do anything more */
if (!(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
{
struct problem_context pctx;
journal_t *journal;
- int retval;
+ errcode_t retval;
clear_problem_context(&pctx);
return retval;
}
-int e2fsck_run_ext3_journal(e2fsck_t ctx)
+errcode_t e2fsck_run_ext3_journal(e2fsck_t ctx)
{
io_manager io_ptr = ctx->fs->io->manager;
int blocksize = ctx->fs->blocksize;
ctx->fs->super->s_kbytes_written += kbytes_written;
/* Set the superblock flags */
- e2fsck_clear_recover(ctx, recover_retval);
+ e2fsck_clear_recover(ctx, recover_retval != 0);
/*
* Do one last sanity check, and propagate journal->s_errno to
int ref_offset, void *priv_data);
static void delete_file(e2fsck_t ctx, ext2_ino_t ino,
struct dup_inode *dp, char *block_buf);
-static int clone_file(e2fsck_t ctx, ext2_ino_t ino,
- struct dup_inode *dp, char* block_buf);
+static errcode_t clone_file(e2fsck_t ctx, ext2_ino_t ino,
+ struct dup_inode *dp, char* block_buf);
static int check_if_fs_block(e2fsck_t ctx, blk64_t test_block);
static int check_if_fs_cluster(e2fsck_t ctx, blk64_t cluster);
return 0;
}
-static int clone_file(e2fsck_t ctx, ext2_ino_t ino,
- struct dup_inode *dp, char* block_buf)
+static errcode_t clone_file(e2fsck_t ctx, ext2_ino_t ino,
+ struct dup_inode *dp, char* block_buf)
{
ext2_filsys fs = ctx->fs;
errcode_t retval;
struct fill_dir_struct {
char *buf;
struct ext2_inode *inode;
- int err;
+ errcode_t err;
e2fsck_t ctx;
struct hash_entry *harray;
int max_array, num_array;
static const char *my_ver_string = E2FSPROGS_VERSION;
static const char *my_ver_date = E2FSPROGS_DATE;
-static int e2fsck_check_mmp(ext2_filsys fs, e2fsck_t ctx)
+static errcode_t e2fsck_check_mmp(ext2_filsys fs, e2fsck_t ctx)
{
struct mmp_struct *mmp_s;
unsigned int mmp_check_interval;
void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,
struct ext2_inode * inode, const char *proc)
{
- int retval;
+ errcode_t retval;
retval = ext2fs_read_inode(ctx->fs, ino, inode);
if (retval) {
struct ext2_inode *inode, int bufsize,
const char *proc)
{
- int retval;
+ errcode_t retval;
retval = ext2fs_read_inode_full(ctx->fs, ino, inode, bufsize);
if (retval) {
struct ext2_inode * inode, int bufsize,
const char *proc)
{
- int retval;
+ errcode_t retval;
retval = ext2fs_write_inode_full(ctx->fs, ino, inode, bufsize);
if (retval) {
extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
struct ext2_inode * inode, const char *proc)
{
- int retval;
+ errcode_t retval;
retval = ext2fs_write_inode(ctx->fs, ino, inode);
if (retval) {